{{theTime}}

Search This Blog

Total Pageviews

Singleton Design Pattern Java Implementation using static variable

public class SingletonClass{

private SingletonClass() { }
private static class SingletonClass {
private static final SingletonClass INSTANCE = new SingletonClass();
}

public static SingletonClass getInstance() {
return SingletonClass.INSTANCE;
}
}

No comments:

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...