My Variable c is always zero. I dont understand why its not updating. can anyone please explain why this is happening. what should i do to avoid this
public static int linearSearch(Exam[] marks, String name) {
    int c =0;
    if( marks==null)
    {
        return -1;
    }
    else{
        for(int i=0;i<marks.length;i++)
        {
            //System.out.println(a[i]);
            if(performances[i].getName()==name)
            {
                c= i;
            }
        }
    }
    return c;
    //to be completed
}
 
     
    