The == operator tests if the two references point/refer to the same object.
It is possible for there to be two Strings (ie two different objects) with the same contents. The equals method would say...
Type: Posts; User: Norm
The == operator tests if the two references point/refer to the same object.
It is possible for there to be two Strings (ie two different objects) with the same contents. The equals method would say...
Instead of assuming, you could test if A was "F" and if not, print out an error message.
Ask google or wikipedia.
It's not a bug. Its a syntax error.
Which statement is at line 17?
The compiler is saying that the statement on line 17 needs and ending ;
You need to understand how to read the API doc that describes how to use a class's...
This is an assignment (=) statement not an equality(==) test.
However, You should use the equals() method to compare Strings. The == operator is for primitives.
Copy and post here the full text...
This is an assignment (=) statement not an equality(==) test.
However, You should use the equals() method to compare Strings. The == operator is for primitives.