This is related to threads. I have a class with synchronized
method m1(). Can I create different instances of this class
and execute the m1() for different threads?
Answer Posted / shashidhar
When a thread enters the Synchronized method the object on
this the method is called gets locked so no other thread
cannot cal that or any other method on same object.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
When can you say a graph to be a tree?
What is the difference between @before and @beforeclass annotation?
What restrictions are placed on method overriding?
what is encapsulation in java? Explain
What does a method signature consist of?
What do you mean by synchronized non access modifier?
What is hashmap and map?
How do you do a line break in java?
What is a singleton factory?
What is thread life cycle?
What are the different conditional statements?
What is a void in java?
What is the largest data type in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?