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 main difference between variable and constant?

1038


What is the difference between conversation & casting?

1054


What is a boolean expression in java?

1035


What is difference between fail-fast and fail-safe?

1241


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

994


What is independent and dependent variables in research?

875


Which class is used by server applications to obtain a port and listen for client requests?

967


What is predicate in java?

1061


What is meant by main method?

1066


Explain the difference between jvm and jre?

1040


What is object english?

1062


How to reverse a string in java?

1084


What is identifier with example?

1050


What is finally in Java?

1081


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

1094