Package models

Examples of models.Singleton4


*/
public class TestSingleton4 {

  public static void main(String args[]) { 
   // Construct 2 singleton objects using the instance method
  Singleton4 s4a = Singleton4.getInstance();
  Singleton4 s4b = Singleton4.getInstance();
  // Set the data value.
  s4a.setData(34);
  System.out.println("First singleton4: " + s4a);
  System.out.println("First singleton4 data value =  " +s4a.getData());
  System.out.println("Second singleton4: " + s4b);
  System.out.println("Second singleton4 data value =  " +s4b.getData());
  }
View Full Code Here

TOP

Related Classes of models.Singleton4

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.