Possible Duplicate:
How do I compare strings in Java?
I cant understand why the declared variables is not the same.
ex code:
String firstPart = "F";
String whole = "False";
String connected = firstPart + "alse";
System.out.println(connected == whole);
Now this produce a boolean and I thought it would be 'true' BUT it is not, It comes out as false and I don't understand why.
Can someone explain this?