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

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -