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
What is the difference between JDBC 1.0 and JDBC 2.0?
Can you pass by reference in java?
What is printwriter in java?
How to set the permissions to a file in java?
What is the association?
What are the restrictions imposed on method overriding?
What about features of local inner class?
What are constants?
What is a method in coding?
What is java thread dump, how can we get java thread dump of a program?
Define inheritance?
What is complexity in java?
what are the states associated in the thread? : Java thread
What access modifiers can be used for class ?
What is difference between word and integer?