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 a variable in java?
How does list work in java?
When can we say that threads are not lightweight process in java?
What is difference between throw and throws ?
Can string be considered as a keyword?
Which collection allows duplicate values in java?
Define an abstract class with reference to java.
What do you mean by order of precedence and associativity?
Can a static class have a constructor java?
Describe method overriding
How can we pass argument to a function by reference instead of pass by value?
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.
What are disadvantages of java?
What are multiple inheritances? Is it supported by java?
How does map works in java?