yes static synchronized methods lock on the class and instance methods lock on the object
The significant problems we face cannot be solved by the same level of thinking which created them – Einstein SCJP 1.5, SCWCD, SCBCD in the making
Joined: Oct 15, 2007
Thanks for your reply. Then suppose there are 2 threads. Thread-1 is accessing static synchronizes method. Now can thread-2 access non-static synchronized method if thread-1 is accessing staic synchronized method.
Joined: Jan 01, 2007
yes if Thread-1 is accessing static synchronized methods of a class then Thread-2 can access the non-static synchronized methods of that class... the point is static synchronized methods and non-static synchronized methods dont block each other