in the if statement is returning as unexpected type– required: variable found: value. I tried == and that obviously didn't work.
public class Array
{
private College[] coll;
public Array(College[] coll){
this.coll = coll;
}
public String changeTheValue(String name,int number){
String result= new String();
for(int i = 0 ; i < this.coll.length-1;i++){
if(this.coll[i].getName() == name){
this.coll[i].getNumber() = number;
res += "Successfully changed the value of name "+this.coll[i].getName()+" "+this.coll[i].getNumber()+"\n";
}
else {
res +=this.coll[i].getName()+" not found.";
}
}
return result;
}
}