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

The lock is released when the holding thread exits the
synchronized block.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to force the garbage collection in java.

970


What is the use of 'super' keyword inside a constructor?

976


String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?

981


Explain the difference between throw and throws in java?

1007


What are methods of a class?

1037


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

1134


How many bits are in a sentence?

1178


What is difference overloading and overriding?

1172


What is the difference between jvm and jre? What is an interface?

1100


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

2166


What is map java?

981


What is the diffrence between inner class and nested class?

1093


How to Sort Strings which are given in List and display in ascending order without using java api.

4439


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

1090


What is the largest long allowed by java?

1066