previous
|
start
|
next
Strings
Use
equals
to compare strings
if (greeting.equals("Hello"))
==
only tests whether the object references are identical:
if ("Hello".substring(1, 3) == "el") ... // NO!
previous
|
start
|
next