Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Problem
- {
- public static void main(String[] args)
- {
- Scanner keyboard = new Scanner(System.in);
- int choice = 1;
- while(choice > 0)
- {
- System.out.println("What would you like to do?");
- System.out.println("1) Enter a new list of words.");
- System.out.println("2) Find First and Last Alphabetical, and Longest and Shortest.");
- System.out.println("3) Show the current list of words.");
- System.out.println("0) Exit the Program.");
- System.out.print("> ");
- choice = Integer.parseInt(keyboard.nextLine());
- if(choice < 0 || choice > 3)
- {
- System.out.println("Invalid Command!");
- System.out.println(" ");
- continue;
- }
- else if(choice == 2)
- {
- }
- else if(choice == 1)
- {
- }
- }
- System.out.print("Goodbye!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment