What is the difference between the synchronized() & static
synchronized()?

Answers were Sorted based on User's Feedback



What is the difference between the synchronized() & static synchronized()?..

Answer / sitaram

synchronizing is the process of ensuring the share resources
will be accessing only one thread at a time. There are two
types of synchronizations.
1. static synchronized(Class level)
2.synchronized.(Object Level).

Is This Answer Correct ?    12 Yes 1 No

What is the difference between the synchronized() & static synchronized()?..

Answer / namrata

when a Thread enters a static synchronized method of a
given class, then no other Thread can enter another static
synchronized method of that class. But other threads might
execute any non-synchronized method, or a synchronized
instance method.

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More Core Java Interview Questions

Is alive method in java?

0 Answers  


What is the importance of main method in Java?

0 Answers  


What is java class writing rules?

1 Answers   Oracle,


Howmany classes that package java.applet.* contains?

1 Answers   TCS,


What is user defined exception in Java?

0 Answers   TCS,






What are the main uses of java?

0 Answers  


What is the latest java version?

0 Answers  


What are Font and FontMetrics classes?

1 Answers  


How do you convert an int to a double in java?

0 Answers  


What is a vararg?

0 Answers  


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

0 Answers  


How to retrieve data from database in java using arraylist?

0 Answers  


Categories