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 purpose of the finalize() method?
How does remove work in java?
how to handle exceptions in ejb?
Do loops java?
How can an object be unreferenced?
Which is bigger float or double java?
Can a constructor call the constructor of parent class?
Explain the difference between collection api and stream api in java8?
List out five keywords related to exception handling ?
what is the major difference between linkedlist and arraylist in java?
how to create multithreaded program? Explain different ways of using thread? : Java thread
How would you use Bubble Sort to sort the number of elements?
What is the difference between length and size in java?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
What do you mean by platform independence of Java?