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

important features of java which differenciate it from c++

3 Answers  


What is the difference between Super and This Keyword?

4 Answers   HCL, TCS,


how to get value in combo for updation?

1 Answers   CMC,


What are the disadvantages of using threads?

3 Answers   Oracle, SFS,


wahts is mean by dynavalidatorform in struts/

1 Answers   SolutionNET,






which deployment descriptor element is used to configure the authentication method? a. auth-config b. login-config c. sec-config

1 Answers  


How a component can be placed on Windows?

0 Answers   Wipro,


how we can implement interface in jsp ?

2 Answers   Google,


What is the name of the state, when a thread is executing?

4 Answers  


Why do threads block on i/o?

0 Answers  


What is a tasks priority and how is it used in scheduling?

0 Answers  


What is the difference between the font and fontmetrics classes?

0 Answers  






Categories