8 Replies Latest reply on Nov 21, 2006 1:09 AM by 807607

    static and non-static Synchronized methods - difference.

      My Understanding : If a static method is synchronized, then only one static synchronized method in the class will be accessible at any point of time to the threads. So if there were two threads and one of them is accessing a non-static synchronized method, and the other is accessing a static synchronized method, both threads should comfortably have access to those methods.

      Other statement : If a static synchronized method is accessed by a thread, then even non-static synchronized methods are not available to other threads.

      Which one is true of above 2 statements, if u could give an example and explanation to above query. Also, If someone gives the difference between static and non-static Synchronized methods. Thanks all.