About 3,700,000 results
Open links in new tab
  1. How does synchronized work in Java - Stack Overflow

    34 In Java, each Object provides the ability for a Thread to synchronize, or lock, on it. When a method is synchronized, the method uses its object instance as the lock. In your example, the methods bow …

  2. java - What does 'synchronized' mean? - Stack Overflow

    Jul 6, 2009 · I have some questions regarding the usage and significance of the synchronized keyword. What is the significance of the synchronized keyword? When should methods be synchronized? …

  3. How Synchronization works in Java? - Stack Overflow

    Jun 25, 2012 · I have a doubt regarding Java Synchronization . I want to know if I have three Synchronized methods in my class and a thread acquires lock in one synchronized method other two …

  4. synchronization - How to synchronize or lock upon variables in Java ...

    How to synchronize or lock upon variables in Java? Asked 14 years, 7 months ago Modified 6 years, 7 months ago Viewed 178k times

  5. Java Singleton and Synchronization - Stack Overflow

    Jun 23, 2012 · Please clarify my queries regarding Singleton and Multithreading: What is the best way to implement Singleton in Java, in a multithreaded environment? What happens when multiple threads …

  6. java - Synchronization vs Lock - Stack Overflow

    java.util.concurrent API provides a class called as Lock, which would basically serialize the control in order to access the critical resource. It gives method such as park() and unpark(). We ca...

  7. What is the use of static synchronized method in java?

    Nov 3, 2023 · Nowadays, Java has more powerful concurrency features, in java.util.concurrent and its subpackages, but the core Java 1.0 constructs such as synchronized methods are still valid and usable.

  8. Java - synchronizing static methods - Stack Overflow

    Mar 11, 2013 · Here is a piece of text I found at this link. "Avoid lock on static methods The worst solution is to put the "synchronized" keywords on the static methods, which means it will lock on all

  9. Java synchronized method lock on object, or method?

    In Java synchronization,if a thread want to enter into synchronized method/block, it will acquire the lock on: all synchronized non-static methods of this object

  10. Performance of synchronize section in Java - Stack Overflow

    Apr 6, 2017 · I had a small dispute over performance of synchronized block in Java. This is a theoretical question, which does not affect real life application. Consider single-thread application, which uses ...