Why Wait and notify are kept in Object class although they
are used only with Thread Class
Answers were Sorted based on User's Feedback
Answer / srinivas
Since the locking mechanism happens at the Object level so
they are in Object Class.
| Is This Answer Correct ? | 21 Yes | 4 No |
Answer / chandrasekhar
wait(),notify() are worked on the objects to control the
multiple thereads,not on theread.Hence these methods are
difined object class.
| Is This Answer Correct ? | 14 Yes | 8 No |
What is the difference between array and arraylist? what is the difference between arraylist and linkedlist?
Explain the difference between protected and default access.
List some important features of java 10 release?
What is Major and importance difference between for and foreach loop ?
when everything can be done by static block then why do we use main method?.
I have 100 records in a table with two rows. I need to display 10 records per page like Google Search. I need only the Logic(Pagination) in Pure Java. No JSP and all..Thanks in Advance...
What are jee technologies?
Is singleton class thread safe?
What is the use of protected in java?
Is there a way to increase the size of an array after its declaration?
Why do we use bufferedreader?
Can extern variables be initialized?