Guest User

Untitled

a guest
May 29th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package phone;
  6.  
  7.  
  8.  
  9.  
  10. import java.util.Scanner;
  11. import java.util.ArrayList;
  12.  
  13. public class Phone {
  14.  
  15. /**
  16. * @param args the command line arguments
  17. */
  18. public static void main(String[] args) {
  19. Scanner keyboard = new Scanner(System.in);
  20. String name;
  21. double number;
  22.  
  23. ArrayList<Double> PhoneList = new ArrayList<Double>();
  24.  
  25. while(true){
  26. System.out.println("What is the name:");
  27. name = keyboard.nextLine();
  28.  
  29. System.out.println("What is the phone number:");
  30. number = keyboard.nextInt();
  31.  
  32. System.out.println("Would you like to add another computer?(yes/no)");
  33.  
  34. String again = keyboard.nextLine();
  35.  
  36.  
  37.  
  38. if (again.equals("no"))
  39. {
  40. System.out.println("Thank you for entering these numbers ");
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment