Example of Singleton pattern in Java.