Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of the finalize() method?

1193


How does remove work in java?

919


how to handle exceptions in ejb?

2273


Do loops java?

971


How can an object be unreferenced?

991


Which is bigger float or double java?

936


Can a constructor call the constructor of parent class?

991


Explain the difference between collection api and stream api in java8?

930


List out five keywords related to exception handling ?

966


what is the major difference between linkedlist and arraylist in java?

1120


how to create multithreaded program? Explain different ways of using thread? : Java thread

922


How would you use Bubble Sort to sort the number of elements?

969


What is the difference between length and size in java?

948


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).

1945


What do you mean by platform independence of Java?

1096