Which are methods of the Object class? (Choose all that apply.)
-
notify();
-
wait(long msecs);
-
interrupt();
-
synchronized();
A,B
Correct answer
Explanation
notify() and wait(long) are methods defined in the java.lang.Object class, which serves as the root class for all Java objects. interrupt() is a method of the java.lang.Thread class, and synchronized is a Java keyword used for locking blocks or methods rather than a method itself.