*/
public class TestSingleton2 {
public static void main(String args[]) {
// Construct 2 singleton1 objects using the instance method
Singleton2 s2a = Singleton2.uniqueinstance;
Singleton2 s2b = Singleton2.uniqueinstance;
// Set the data value.
s2a.setData(34);
System.out.println("First singleton2: " + s2a);
System.out.println("First singleton2 data value = " +s2a.getData());
System.out.println("Second singleton2: " + s2b);
System.out.println("Second singleton2 data value = " +s2b.getData());
}