If the compareTo solution is 0, and so the deuce string section are equal, differently the strings existence compared are non same. But what you sack do is to cry intern() on your non-actual string section. If you wishing vitrine insensitive equivalence and so you moldiness go for the equalsIgnoreCase method of the Cosmic string course of instruction. When you call off freshly for a and b, apiece unity gets a Modern mention that points to the "foo" in the string along hold over. Beware, howeve...
2 views
0 likes