Search This Blog

Total Pageviews

Thread safe Singleton Design Pattern Java Implementation

public class SingletonClass{
private static SingletonClass instance = null;
private SingletonClass() { }
public static synchronized SingletonClass getInstance() {
if (instance == null) {
instance = new SingletonClass();
return instance;

No comments:

java.lang.IllegalArgumentException: Unsupported class file major version 60

- Check the stack trace and version of Java. - Update the correct Java Version to resolve the Exception.