equals for String does not do a reference compare, does a value one.
For other classes you create, if you dont override equals and hashcode, it will do a reference compare, otherwise it will call your override.
1.4m articles
1.4m replys
5 comments
56.9k users