Answer Posted / ranganathkini
When a thread yields, its execution is paused and loses
ownership of the monitor lock giving other waiting threads a
chance to run.
When a thread sleeps, its execution is paused for the
specified duration during such an idle period, the thread
continues to retain the ownership of the monitor lock.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What does singleton class mean?
Can we override private constructor in java?
What is hashtable and explain features of hashtable?
How does queue work in java?
Can java list be null?
What is jar?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
How many types of threads are there in java?
What does exclamation mean in java?
Is age discrete or continuous?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What is variable and example?
What are the different tags provided in jstl?
What is math floor in java?
Does set allows null in java?