Answers were Sorted based on User's Feedback
Answer / 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|
Answer / ravikiran
yield() method will suspend all the same priority thread
which is running and gives chance to next thread to run
which is of the same priority
sleep() method will make the thread to sleep for a
particular period of time which is specified in the
|Is This Answer Correct ?||1 Yes||2 No|
StringBuilder s = new StringBuilder("Hello Mom");s.append(",I mean,Mother"); Response.Write(s.ToString()); String s = "Hello Mom"; s+ = ",I mean Mom"; Response.Write(s); Which is faster ? which uses the most memory?
What is the Set interface?
What is an anonymous class?
Can we call the Thread.sleep in Synchyronozed block?
what is inner class?
How does JAVA ClassLoader work?
why the equals method can be override?when we override the equals method?
What are wrapper classes?
What is the difference between Static and final?
Which method will get invoked first in a stand alone application?
posted in online test
________ exception must be either caught or specified in throws class of the method.