So I'm doing a program that would require to enter a number and enter it's alphabet the output should be like this.
Output (Should be):
|a
Next input b:
|b|a
So happens that its like this:
Output (My program output):
|a
Next input b:
|b
Output (Should be):
|a
Next input b:
|b|a
So happens that its like this:
Output (My program output):
|a
Next input b:
|b
do{
System.out.println("\n\nPlease enter your choice from the following menu:");
System.out.println("1. Enter number");
System.out.println("2. Exit");
choice = Integer.parseInt(reader.readLine());
switch (choice){
case 1:
System.out.print("Enter number: ");
find=Integer.parseInt(reader.readLine());
for(i=0;i<anNumber.length;i++){
if(find == anNumber[i]){
anFinals[i] = anLetters[i];
System.out.print("| "+anFinals[i]);
}
}
case 2:
break;
}
}while (choice > 0 && choice < 2);