ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is yielding and sleeping? how they different?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is yielding and sleeping? how they different?
Answer
# 1
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 ?    2 Yes 0 No
Ranganathkini
 
  Re: What is yielding and sleeping? how they different?
Answer
# 2
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 
argument list
 
Is This Answer Correct ?    1 Yes 1 No
Ravikiran
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How can you say HashMap is syncronized? IBM13
What is the % operator?  2
what are the methods of an object class?  3
Diff between C++ and java? TCS8
What is the difference between serialization and deserialization? ABC2
What is Servlet?  8
How will you convert an ArrayList to Arrays? KPIT3
How to eliminate duplicates from an array? Wipro3
What is update method and when it is called?  1
What is the GregorianCalendar class? HCL1
when we write class.forName("any one class"); what happens actually?what it will return?explain stepwise?  4
What is the difference between Resultset and Rowset. IBM5
Difference between Applet & Application?  5
Marker interface means , interface which has no methods.Then what is the necessity of its usage.I read "it tells the compiler that it should be treated differently ". "It is used to store state of an object". But still am not clear.Please explain clearly.  1
where u use Abstraction and Interface in real time Sonata2
what is meaning of JIT?  4
explain System.out.println() CTS7
Howmany number of objects we can store in an ArrayList. Is there any limit? TCS5
What are wrapper classes? Noah-Solutions6
What is unicode?  2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com