Back
Basically, == operator helps you with the reference equality like both the objects are same or not whereas .equals() helps you with the value equality like both the objects are logically equal or not.
I hope this will help.
Want to become a Java expert? join Java Certification now!!
Want to know more about Java? Watch this video on Learn Java | Java Programming for Beginners:
31k questions
32.8k answers
501 comments
693 users