This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
the object is sychronized only one thread can get the object lock at a time.
Joined: Dec 05, 2000
generally what type of objects do we synchronize, the class which implements the Runnable interface or any object which holds important data ??
El Roy Cabildo
Joined: Oct 19, 2002
well it depends on you...if you are designing as system that only one thread can access then sychronized it....imagine if you have a application which deals banking...threads can freelyy withdraw and deposits... try this link...http://java.sun.com/docs/books/tutorial/essential/threads/index.html