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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

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

596


What is string buffer?

506


What is the base class of all classes?

571


What is ctrl m character?

518


What are features of java?

561






Explain the importance of join() method in thread class?

640


How do you create a method in java?

547


How many types of design patterns are there?

531


How does compareto method work?

524


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

558


Which methods cannot be overridden in java?

539


What is anti pattern in java?

519


What two classes are used to read data only?

640


Does list allow duplicates in java?

522


Why is static used?

552