This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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