Can we call the Thread.sleep in Synchyronozed block?

Answer Posted / veerendra

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 ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of design patterns are there?

536


Why bytecode is called bytecode?

597


What is a vararg?

565


What is the static field modifier?

606


How to make object serializable in java?

559






What is polymorphism and what are the types of it?

515


Can we execute a program without main() method?

539


What are different types of references?

542


List some important characteristics on jre

600


Explain 5 features introduced in jdk 1.7?

623


What is a Transient Object?

643


What do you understand by the bean persistent property?

571


When parseint method can be used?

551


What do you mean by platform independence? What is an interface?

573


How to display all the prime numbers between 1 and 100

512