Hopefully this is a simple one. I have a section of code:
int x = 17;
int y = 9;
String name = "Robinson";
String bird = "Robin";
My task is to explain what each expression evaluates to, but more importantly why. The 2 expressions I am having trouble with are:
name == bird + "son";
name.equals(bird + "son");
I have checked both statements in the application I am using and the first statement evaluates to False and the second evalutes to True. I'm not really undestanding how these expressions are working as I would expect both statements to evaluate as true?
Any help is greatly appreciated!