Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String[] array1 = {"A","B","C","D"};
- String pick = "";
- for(int a=0; a<array1.length; a++)
- {
- System.out.print("n Pick an exception: ");
- System.out.print("n A. Arithmetic Exception");
- System.out.print("n B. Array Out Of Bounds Exception");
- System.out.print("n C. Array Store Exception");
- System.out.print("n D. Number Format Exception");
- System.out.print("nnPick: ");
- pick = br.readLine();
- pick = array1[a]
- if(array1[a].equalsIgnoreCase ("a"))
- {
- //output1;
- }
- else if(array1[a].equalsIgnoreCase ("b"))
- {
- //output2;
- }
- else if(array1[a].equalsIgnoreCase ("c"))
- {
- ////output3;
- }
- else if(array1[a].equalsIgnoreCase ("d"))
- {
- //output4;
- }
- // PS If anyone can also let me know how I can display the user input depending to the sequence it was selected what would be great!
- System.out.print("nn Status: " +array1[a] + "nn ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement