A Program that asks the question to select A B C or D
Posted on 2004-09-07
Wanting to write a program that asks a user to type A, B, C, or D. When the user types D the program ends. When the user types A, B or C the program displays the message "Good Job!" and then asks for another imput. When the user types anything else, It will issue an error message and then ask for another imput.
This is what I have so far.
public class Imput
public static void main(String args) throws Exception
("Please make a choice of the Following Keys:");
eventType = (char)System.in.read();
//Absorbs Enter Key
if(eventType = 'a' && 'b' && 'c')
while(eventType != 'q')
I'm pretty sure that I'm going to have to use a loop but not sure how. Any help on this would be much appreciated.