Thread
:
Always returns false:
View Single Post
08-06-2012, 02:41 PM
PM User
|
#
2
Fou-Lu
God Emperor
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,657
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
return (s1 == s2);
compares the memory space of two objects. Strings cannot be compared this way, you must use s1.equals(s2).
Fou-Lu
View Public Profile
Find More Posts by Fou-Lu