Because, as I said, string literals are special and == will be true if they contain the same characters. See 3.10.5. String Literals in the Java Language Specification where a more exact...
Type: Posts; User: pbrockway2
Because, as I said, string literals are special and == will be true if they contain the same characters. See 3.10.5. String Literals in the Java Language Specification where a more exact...
The value of object variables is a reference to an object. So you are right: a==b may well be false even though a.equals(b) is true. "the same" is not the same as "equal". Think of two $10 notes:...