Junior — Middle
What object in Java is considered the fundamental for implementing all classes and objects?
sobes.tech AI
Answer from AI
In Java, the main object from which all classes and objects inherit is the java.lang.Object class.
All classes implicitly inherit this class unless explicitly specified otherwise. It provides basic methods such as:
equals()— for comparing objectshashCode()— for obtaining the hash code of an objecttoString()— for getting a string representationclone()— for creating a copy of the objectgetClass()— for obtaining information about the object's class
Thus, Object is the root of the class hierarchy in Java.