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

Hi Friends, I am beginner in java. what i know about
synchonized keyword is,If more that one 1 thread tries to
access a particular resource we can lock the method using
synchronized keyword. Then after that how the lock is
released and how next thread access that.Please explain with
example.

Answer Posted / ejp

Throwing the exception exits the synchronized{} block so
that answer doesn't actually add anything.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

do I need to use synchronized on setvalue(int)? : Java thread

957


Define Multiprogramming and Multiprocessing in java.

1062


What is oop principle in java?

1051


What is difference between arraylist and list in java?

1022


Why put method is idempotent?

837


What package is math in java?

946


What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

1048


What is a predicate method?

957


Who developed java?

936


What is a class in java?

960


What are the new features in java 8?

975


What is difference between stringbuffer and string?

897


Differences between external iteration and internal iteration?

1087


What is entry set in java?

1027


Why do we need hashmap in java?

1027