hi
We are creating a program for class which will take keyboard input and then get the instructions from that basically there could be as many as 4 instructions
currently I am doing the following
System.out.println("Enter Input: ");
humanInput = br.readLine();
StringTokenizer humanInputBrokenUp = new StringTokenizer(humanInput, " ");
if(humanInputBrokenUp.nextToken().toString().equals("exit")){
System.out.println("quitting the program");
System.exit(0);
} else if (humanInputBrokenUp.nextToken().toString().equals("list")){
}
when it gets to the second else if statement it has moved to the second token..... and I cannot use a different variable for each because I do not know how many elements there will be
HELP please! :)