Which of the following methods are defined in the Object class?
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
Зарегистрируйся сейчас
или Подпишись на будущие тесты