When you will synchronize your code?

Answers were Sorted based on User's Feedback

When you will synchronize your code?..

Answer / ranganathkini

synchronize is used on objects that will be used by
multiple threads to provide thread safety. It is used so
that concurrent threads get valid access to data to perform
their actions

Is This Answer Correct ?    1 Yes 0 No

When you will synchronize your code?..

Answer / devarathnam c,kotagudibanda(po

Hi... If your code requires "Thread-safty" ,and to avoiding
deadlocks,when u want maintain dataintegrity.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What is the difference between the font and fontmetrics classes?

0 Answers  

What is the difference between the ‘font’ and ‘fontmetrics’ class?

0 Answers  

How many JSP scripting elements and what are they?

4 Answers   TCS,

What is a modular application? What does module-relative mean?

0 Answers  

What do you need to set-up a cluster with jboss?

0 Answers  

what is DGC?

1 Answers  

whats is statement and procedure

0 Answers   TCS,

How do you maintain a stateful session object across the session

2 Answers   HCL,

what is difference between object state and behaviour?

3 Answers  

why we use main in java?

4 Answers  

Why a client should be multithreading? Explain.

0 Answers  

Describe, in general, how java's garbage collector works?

0 Answers