What is synchronization? How it can be achieved?

Answers were Sorted based on User's Feedback



What is synchronization? How it can be achieved?..

Answer / ravikiran(aptech mumbai)

synchronization is the process of allowing only one thread
at a time.It's been achieved by marking the method as
synchronized or locking a particular portion of code

Is This Answer Correct ?    7 Yes 5 No

What is synchronization? How it can be achieved?..

Answer / sainaveen

Synchronization is a mechanism used to control multiple
threads from accessing shared resources, if multiple
threads access shared resources there might be a chance for
one thread to change the shared values of another thread
leading to errors

Is This Answer Correct ?    6 Yes 8 No

Post New Answer

More Core Java Interview Questions

When you declare a method as abstract method ?

2 Answers   HP,


Which data type is class in java?

0 Answers  


What is the use of anonymous inner classes ?

12 Answers   DELL, HCL,


What do you mean by constant time complexity?

0 Answers   Amazon,


Who developed JScript language?

3 Answers  






hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class

1 Answers  


Can a class have 2 constructors?

0 Answers  


Which is fastest collection in java?

0 Answers  


Why is string builder not thread safe?

0 Answers  


What is the difference between Static and final?

1 Answers  


How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance

2 Answers   TCS,


What do you understand by synchronization?

0 Answers  


Categories