What is the Singleton pattern in Java, and why is it used?
The Singleton pattern is used to create only one instance of a class and is most useful for managing global state, but it can lead to tight coupling between classes.
That's partially correct. While Singleton does restrict the instantiation of a class to one object, it doesn't inherently lead to tight coupling; it depends on how it's implemented.
Can you describe how to implement the Singleton pattern in a thread-safe manner using the `double-checked locking` method?