SHARE
TWEET

Untitled

a guest Mar 20th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.                 List<Integer> myList = new ArrayList<>();
  3.     Scanner scan = new Scanner(System.in);
  4.     int i = 1;
  5.     int seven;
  6.     seven = 7;
  7.  
  8.     while(i <= 7)
  9.     {
  10.        System.out.print("Please Enter a Number: ");
  11.        myList.add(scan.nextInt());
  12.        i++;
  13.     }
  14. System.out.println(myList.get(0));
  15. if (myList.contains(seven))
  16. System.out.print("Seven Exists");
  17. else
  18. System.exit(0);
  19. {
  20.    }
  21.  
  22. }
  23. }
RAW Paste Data
Top