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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
diff b/w sleep(1000) and wait(1000)?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: diff b/w sleep(1000) and wait(1000)?
Answer
# 1
The sleep method is used when the thread has to be put 
aside for a fixed amount of time. Ex: sleep(1000), puts the 
thread aside for exactly one second. The wait method is 
used to put the thread aside for up to the specified time. 
It could wait for much lesser time if it receives a notify
() or notifyAll() call. Ex: wait(1000), causes a wait of up 
to one second. The method wait() is defined in the Object 
and the method sleep() is defined in the class Thread.
 
Is This Answer Correct ?    12 Yes 2 No
Rajani Nagandla
 
  Re: diff b/w sleep(1000) and wait(1000)?
Answer
# 2
In sleep method the thread does not release the object lock
 
Is This Answer Correct ?    0 Yes 4 No
Satwant Singhnagpal
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to add two numbers with out using Arithmetic , union operators in java....? But we can use bitwise operators... but how...? CTS2
What is the difference between throw and throws? What is the similarity between try and throw?  2
What is finally in exception handling?  6
What is casting?  3
Why are the methods of the Math class are static?  1
what is features of jdk 1.5? TCS2
What is the functionality of Webserver?  2
Under what circumstances an object reference be cast to an interface reference?  3
What is the catch or declare rule for method declarations?  1
what is the difference between the "protected and default" modifiers?  4
Name the class that used to read objects directly from a stream? Wipro2
which methods consisting of the serilizable interface?  3
what ide u r using and wat version, how wil u build the project etc ?  2
what is meant by UP& DOWN casting in java?  4
what is aberivation of java?  10
How many methods does cloneable interface contains?  2
how can i connect to database in a applet ?  1
why the constructor should be used in class,if there is no constructor what will happen?  4
What is difference between static method and static variable?  6
Write java code to print "Hello how are you" Thread1 should have "Hello" Thread2 should have "how are you" both the threads should start at the same time Huawei2
 
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