![]() |
#1 |
Registered User
Join Date: Nov 2015
Posts: 127
|
what is difference between .. and equal() in java ?
what is difference between .. and equal() in java ?
|
![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Jul 2016
Posts: 28
|
Both == and .equals() refers to the same object if you don't override .equals().
Its your wish what you want to do once you override .equals(). You can compare the invoking object's state with the passed in object's state or you can just call super.equals() |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|