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 / jitu

The lock is released when the holding thread exits the
synchronized block or an exception is occurred in execution.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is session in java?

1226


What is a vararg?

1016


Explain the hierarchy of java exception classes?

1072


Can static methods access instance variables in java?

1063


Why call by value prevents parameter value change?

1056


What is a method in coding?

1035


Can we have two methods in a class with the same name?

1042


What is the main advantage of passing argument by reference?

948


What is the purpose of nested class in java?

1064


Can we create an object of static class in java?

1002


What is command line argument

1180


What is type safety in java?

937


Why multiple inheritance is not supported by java?

962


Why hashset is used in java?

1045


Does a class inherit the constructors of its superclass in java programming?

1081