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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
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
Can we call the Thread.sleep in Synchyronozed block?
 Question Submitted By :: Pvnarasimhareddy
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Can we call the Thread.sleep in Synchyronozed block?
Answer
# 1
ofcourse you can call thread.sleep in synchronized 
block,when we call means when there is a possibility of 
loop inside the synchronized block.
 
Is This Answer Correct ?    0 Yes 1 No
Pramod
 
  Re: Can we call the Thread.sleep in Synchyronozed block?
Answer
# 2
While the thread is sleeping in a synchronised block means, 
you are locking a resource, there might be 'n' number of 
contenders for this resources. If the thread goes to sleep 
then other threads or processes contending for the resource 
will be blocked infinitely.
 
Is This Answer Correct ?    1 Yes 0 No
Veerendra
 
 
 
  Re: Can we call the Thread.sleep in Synchyronozed block?
Answer
# 3
yes, you can call wait method inside synchronized block but 
synchronized block usually allows one by one to penetrate 
in.if you call wait method inside it will create a stagnant 
circumstance. synchronized block wont allow other threads 
inside till this thread in waiting state get notified
 
Is This Answer Correct ?    0 Yes 0 No
Muthusenthil
 
  Re: Can we call the Thread.sleep in Synchyronozed block?
Answer
# 4
Yes we can call,And should be enclosed between try catch 
blocks beacause Interupted exception may be thrown.
 
Is This Answer Correct ?    0 Yes 0 No
Ravikiran
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the protocol is used in type4 driver? CMC1
if two references are having same hash codes,is that means those are refering to same object? CTS4
Which Java operator is right associative?  1
explain System.out.println IBM18
what is the JNDI?  3
What are the standards to place package statement within a source code file?  1
How many ways can an argument be passed to a subroutine?  1
What is an Applet ?  2
How is Garbage collection done in Java? T3-Softwares2
what is the life cycle of jsp? Photon1
How do you relate a Interface to a Class? Tell me in Detail?  4
Is java supports multiple inheritance? explain? Inforica9
Explain method overloading and overriding? Explain What Is Meant By The Term ‘method Overloading’.5
Differentiate constructor and a method and how are it be used? Wipro4
How to transfer data from an Applet to Servlet ?  1
In Serialization, whether you will use Static variables? HCL1
Explain Connection Pooling?  2
how you will prevent method overriding? HCL3
how to compile jsp? Logica-CMG1
Difference between Superclass and Subclass?  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
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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