Which of the following methods are defined in the Object class?
Explanation
Every Object in java has synchronisation mechanism for multithreading. You can use wait() and notify() methods on any object to synchronise your multithreaded logic. As an example

Object lock = new Object();
// later ..
synchronized (lock) {
    lock.wait(); // Will block until lock.notify() is called on another thread.
}
// Somewhere else...
synchronized (lock) {
    lock.notify(); // Will wake up lock.wait()
}
Other options are not present in Object class methods.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести