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,


what is diff between Access modifier and specifier?

5 Answers   L&T,


What is metaspace?

0 Answers  


whats is mean by object and class?

1 Answers   Saka Solutions,


What is scalable, portability in the view of J2EE?

0 Answers  






What is thread deadlock? How to resolve thread deadlock?

3 Answers  


What is a thread?

3 Answers  


What are the sequence of steps to write pub or sub model kind of application?

0 Answers   TCS,


Difference Between getRequest and PostRequest?

8 Answers   HCL, TCS,


what are JSP tags? what is difference between include action and directory?

0 Answers   ADP,


difference between applicationserver and webserver

2 Answers   SolutionNET,


What is difference between object state and behavior?

0 Answers  


Categories