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

The lock will be released & allocation depends on the scheduler

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is string immutable in java?

541


Why is multiple inheritance not supported in java?

559


What do you mean by an interface in java?

570


What is difference between protected and private?

528


Can inner class extend any class?

596






What is java life cycle?

535


Is nullpointerexception checked or unchecked?

553


Why arraylist is used in java?

547


Can we execute a program without main() method?

529


What is function and its uses?

564


What is stack explain?

499


What is an infinite loop in java? Explain with an example.

586


What do you know about the garbage collector in java?

570


Write a program to find the whether a number is an Armstrong number or not?

571


What is the main difference between java platform and other platforms?

506