This post originated from an RSS feed registered with Java Buzz
by Javin Paul.
Original Post: Why wait, notify and notifyAll is defined in Object Class and not on Thread class in Java
Feed Title: Javarevisited Blog
Feed URL: http://javarevisited.blogspot.com/feeds/posts/default?alt=rss
Feed Description: Blog on Java, Unix, Linux, FIX Protocol technology. I share my experience as tutorial, article, interview questions, programming, design etc.
Why wait, notify and notifyAll is declared in Object Class instead of Thread is famous core java interview question which is asked duringall levels of Java interview ranging from 2 years, 4years to quite senior level position on java development. Beauty ofthis question is that it reflect what does interviewee knows about wait notify mechanism, how does it sees whole wait andnotify feature and whether his understanding is not shallow on this topic. Like Why Multiple inheritance is not supported in Javaor why String is final in java there could be multiple answers of why wait and notify is defined in Object class and every one could justify there reason.