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