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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you compare characters in java?

522


What is treeset and treemap in java?

580


Is arraylist ordered in java?

570


Can you instantiate the math class in Java?

607


Is java util list serializable?

535






Is java a compiler?

567


Can java program run without jre?

567


Are arrays passed by reference in java?

482


Does java have extension methods?

527


How do you square a number?

580


When can we say that threads are not lightweight process in java?

588


Can we serialize arraylist in java?

540


What are the wrapped, classes?

597


Why inputstreamreader is used in java?

545


What are the advantages of java inner classes?

557