Sobes.tech
Junior

What methods do you know in the Object class?

sobes.tech AI

Answer from AI

equals(Object obj): Compares the current object with another object for equality.
hashCode(): Returns the hash code of the object.
toString(): Returns a string representation of the object.
getClass(): Returns the Class object representing the class of the object.
clone(): Creates a shallow copy of the object.
notify(): Wakes up a single thread that is waiting on this object's monitor.
notifyAll(): Wakes up all threads that are waiting on this object's monitor.
wait(): Causes the current thread to wait until another thread invokes notify() or notifyAll(), or until a specified timeout expires.
wait(long timeout): Same as wait(), but with a specified maximum wait time in milliseconds.
wait(long timeout, int nanos): Same as wait(), but with a more precise wait time.
finalize(): (Deprecated, not recommended for use) Called by the garbage collector before the object is removed.