What are synchronized methods and synchronized statements?




Answers were Sorted based on User's Feedback



What are synchronized methods and synchronized statements?..

Answer / tarunam verma

Syncronized methods are executed only after a lock is
acheived on the classes or objects specified in the methids
and after that the methids are executed

synchronized statements are the synchronised the bolck
containg the lock on some resource, statment in that block
are called synchronised statements

Is This Answer Correct ?    4 Yes 0 No

What are synchronized methods and synchronized statements?..

Answer / sainaveen

Syncronized methods are executed only after a lock is
acheived on the classes or objects specified in the methids
and after that the methids are executed

Synchronized methods are executed after lock is acieved on
class or object specified in the synchronized statement

Is This Answer Correct ?    2 Yes 2 No

Post New Answer




More Advanced Java Interview Questions

how the action can be map from jsp page to bean class in mvc1

1 Answers   Photon,


What are JTA/JTS and how they used by client?

0 Answers  


whats is mean by class.forName() whats the return type of class

6 Answers   SolutionNET,


What is RMI Registry?

6 Answers   Siemens, United Software Solutions,


whats is mean by tiles in struts

2 Answers   SolutionNET,






Can a thread be a member of another thread?

2 Answers  


Can you write Java code for declaration of multiple inheritance in Java ?

6 Answers   Oracle, Kingshir,


does j2ee means advanced java

10 Answers  


What is the difference between system.out ,system.err and system.in?

0 Answers  


what are getters and setters in Java with examples?

0 Answers   HCL, Infotech,


How many layers are there in RMI and what are they?

1 Answers  


When you will synchronize your code?

2 Answers  






Categories