Package models

Examples of models.Singleton1


*/
public class TestSingleton1ab {

  public static void main(String args[]) {
    // Construct 3 singleton1 objects using the instance method
    Singleton1 s1a = Singleton1a.instance();
    Singleton1 s1b = Singleton1.instance();
    Singleton1 s1c = Singleton1b.instance();
   
    // Set the data value.
    s1a.setData(34);
    System.out.println("First singleton1: " + s1a);
    System.out.println("First singleton1 data value =  " + s1a.getData());
View Full Code Here


*/
public class TestSingleton1 {

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

TOP

Related Classes of models.Singleton1

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.