Junior — Middle
What are the main built-in methods available in the Object class in your programming language?
sobes.tech AI
Answer from AI
The Object class in Java provides the following core built-in methods:
equals(Object obj)— compares objects for equality.hashCode()— returns the hash code of the object.toString()— returns a string representation of the object.getClass()— returns the Class object describing the class of the object.clone()— creates a copy of the object (supported by the Cloneable interface).finalize()— called before garbage collection (deprecated method).wait(),notify(),notifyAll()— methods for monitor work and synchronization.
These methods form the basis of object handling in Java and are often overridden to implement specific behavior.