Thread
:
== vs .equals()
View Single Post
05-03-2004, 06:34 PM
#
3
(
permalink
)
Belisarius
Java fanboy
Join Date: Aug 2003
Posts: 1,175
Oh, and "states[0]==myState" won't actually always fail. I messed around with it and was able to get it to return true. It's due to optimizations within the compiler.
Basically, the only time you use "==" with Objects is to test for "null".
__________________
GitS
Belisarius
View Public Profile
Find More Posts by Belisarius