[Solved] What is the need to override equals method in String class? [closed]

[ad_1]

Not all “String in Java are interned”. Try reading something from a file or console, those Strings aren’t “interned”, thus equals() (and also hashcode()) needs to be overriden.

1

[ad_2]

solved What is the need to override equals method in String class? [closed]