Package Singleton

Examples of Singleton.Contact


   
    //Create a contact list
    ContactList myContacts = ContactList.getInstance();
   
    //Add a contact
    Contact newContact1 = new Contact ("Mr", "Fred", "Bloggs", "01234 567890");
    myContacts.addContact(newContact1);
   
    Contact newContact2 = new Contact ("Mrs", "Sheila", "Bloggs", "09876 543210");
    myContacts.addContact(newContact2);
   
    //Output the contacts
    //Get the list name
    System.out.println(myContacts.getListName());
View Full Code Here

TOP

Related Classes of Singleton.Contact

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.