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

Can we define constructors in Servlet?

3 Answers   Accenture, Opus, Wipro,


Is the session factory thread safe?

0 Answers  


Does Java pass arguments by value or reference?

5 Answers   HeadStrong,


can i call multipule form beans in Action class?

1 Answers   Wipro,


wahts is mean by dynavalidatorform in struts/

0 Answers   SolutionNET,






How u validate date in DD/MM/YY format. and how u validate money in ur jsp

3 Answers   Ashok Leyland, Satyam, Tech Mahindra, Tomax,


Is jvm a overhead?

0 Answers  


How primary key is implemented in Oracle?

0 Answers  


What is the difference between RMI and Corba?

0 Answers   Infotech,


What is the difference between Process and Threads?

19 Answers  


JMS based on what technology?

1 Answers  


Howmany interfaces are used in RMI?

2 Answers  


Categories