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 a variable in java?

1138


How does list work in java?

921


When can we say that threads are not lightweight process in java?

1159


What is difference between throw and throws ?

1140


Can string be considered as a keyword?

1038


Which collection allows duplicate values in java?

975


Define an abstract class with reference to java.

1003


What do you mean by order of precedence and associativity?

951


Can a static class have a constructor java?

992


Describe method overriding

1130


How can we pass argument to a function by reference instead of pass by value?

1111


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

1066


What are disadvantages of java?

1001


What are multiple inheritances? Is it supported by java?

953


How does map works in java?

1007