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 methodological framework?

0 Answers  


What do you mean by constructor?

0 Answers  


How the elements are organized in GridBagLayout?

1 Answers  


What is a boolean used for?

0 Answers  


What do you mean by global variable?

0 Answers  


Is java a virus?

0 Answers  


how session will be expired ?

4 Answers   Satyam,


If a multi threaded Java program has started numerous number of threads, at any point in time how to know which thread is currently executing/running ?

7 Answers   Accenture, College School Exams Tests, iFlex, NIIT,


What do you mean by order of precedence and associativity?

0 Answers  


What is byte [] in java?

0 Answers  


Can long be null in java?

0 Answers  


What is return type in java?

0 Answers  


Categories