java - in which cases equals() is similar to ==? -
possible duplicate:
difference between equals , ==
in cases equals()
works ==
operator?
it seems both act similar primitive data types
. there other cases in both of them act equal?
==
compares bits of reference object
type if have reference same object case
for example
integer
value -128 , 127 (inclusive) caches (while autoboxing) instance case here mentioned range of value of integer
Comments
Post a Comment