Java superclass , Object, all classes automatically inherits 3 methods, toString, equeals, hasCode

preview_player
Показать описание
Every class defined without an explicit extends clause automatically extend Object
The class Object is the direct or indirect superclass of every class in Java.
Some methods defined in Object:
toString - which yields a string describing the object
equals - which compares objects with each other
hashCode - which yields a numerical code for storing the object in a set
Рекомендации по теме