java knowledge point 2

"==" and equals the difference between:

"==" is not only to determine the contents of the object, but also determine the address of the object, that is to say "==" object corresponds to the value judgment is whether the same memory

equals is only determined whether the same content within the object, so that the two strings are generally determined using a equals.

Guess you like

Origin www.cnblogs.com/j9527/p/11957382.html
Recommended