Can a lock be acquired on a class?

Answer Posted / ravikiran(aptech mumbai)

yes indirectly because we can aquire a lock on the object of
the class.And for the class level lock we make use of static
synchromnized block.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you understand by synchronization? : Java thread

539


Can you achieve runtime polymorphism by data members?

569


Name four container classes.

544


What is the purpose of the file class in java programming?

516


Define array. Tell me about 2-D array.

576






What is method and methodology?

595


Which is faster set or list in java?

512


Define Multiprogramming and Multiprocessing in java.

567


What is Gang of four design patterns

578


What are the two main uses of volatile in Java?

589


Explain restrictions on using enum?

612


How do you pass by reference?

525


Are registers volatile?

519


What are the files generated after using IDL to java compiler?

572


Can a private method be declared as static?

565