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

Can we overload final method in java?

0 Answers  


Can we have multiple classes in single file ?

0 Answers  


What are legal modifiers that we can use to declare an inner class?

1 Answers   Infosys,


Why do we need autoboxing in java?

0 Answers  


Map map = new HashMap(2); map.add(“1”,”one”); map.add(“2”,”two”); map.add(“3”,”three”); What will happen at this line?

5 Answers   Rolta,


Is sizeof a preprocessor?

0 Answers  


What is the difference between add() and addElement() method in Vector Class ?

2 Answers   TCS,


what is the main differene between synchronize() method and Synchronize{}block?

1 Answers   3i Infotech,


What does a method signature consist of?

0 Answers  


What is data object example?

0 Answers  


What are the skills required for core java?

0 Answers  


What is Java Annotations?

0 Answers  


Categories