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.

Answers were Sorted based on User's Feedback



Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thre..

Answer / ejp

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

Is This Answer Correct ?    3 Yes 0 No

Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thre..

Answer / ejp

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

Is This Answer Correct ?    2 Yes 0 No

Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thre..

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

Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thre..

Answer / jitu

ok i agree with u ejp

wat abt this ??

thread invokes wait() method..

is holding remains in synchronized block or it exists.

Is This Answer Correct ?    0 Yes 0 No

Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thre..

Answer / ravikiran

The lock will be released & allocation depends on the scheduler

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Core Java Interview Questions

What is package protected in java?

0 Answers  


What means public static?

0 Answers  


What is the maximum size of array in java?

0 Answers  


can we access the super class method using subclass object?

4 Answers  


What is method overloading in java ?

0 Answers  


What is a stringbuffer?

0 Answers  


How to access a method that it declared as protected?

3 Answers  


What is a return in java?

0 Answers  


What is a map in java?

0 Answers  


How to set the permissions to a file in java?

0 Answers  


How can an object be unreferenced?

0 Answers  


In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?

2 Answers  


Categories