Trying to write a code that store email addresses and phone numbers. I know I am missing a lot but have no idea how to do it.
<package AddressBookEntryApp; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; import javax.swing.JOptionPane; public class AddressBookEntry { /** * @param args */ // save an AddressBookEntry object to the file public static void saveEntry(AddressBookEntry entry) { } public static void main(String[] args) { int listEntries; // to look up name int addEntry; // add new name and information into system int exit; // to exit the system //Print out the welcome screen System.out.println("Welcome to the Address Book application"); System.out.println(); //Asks user to input new email address & phone number. String email = JOptionPane.showInputDialog("Enter list entries:"); String PW = JOptionPane.showInputDialog("Enter add entry:"); try { String info = null; BufferedWriter out = new BufferedWriter(new FileWriter(info)); out.write("------------------"); out.newLine(); out.write("E-mail: " + email); out.newLine(); out.write("Phone number: " + PN); out.newLine(); out.write("------------------"); out.close(); }catch(IOException e) {} System.exit(0); } }