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

How does linkedhashmap work in java?

1081


What is compareto?

1104


What is the difference between actual and formal parameters?

999


Explain the use of shift operator in java. Can you give some examples?

1035


Explain the JDB in depth & command line.

1064


Explain illegalmonitorstateexception and when it will be thrown?

1156


Explain access specifiers?

1240


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

1058


How does multithreading take place on a computer with a single cpu?

1056


What is type parameter in java?

1001


What does jre stand for?

1121


How do you create a method in java?

1048


What is java used for?

1060


What is a stack class in java ?

1152


Differentiate between overriding and overloading cases?

1167