x1 = input.nextLine();
if(x1.length() == 2){
if(x1.charAt(0) == 'a' || x1.charAt(0) == 'A'){
if(x1.charAt(1) == '1'){
if(a1 == 0){
a1 = 1;
px1 = "a1";
}
}
If a1 is not equal to 0, I want to be able to go back and ask the user to retry to enter a valid entry.. But there is a lot more code that follows (after the curly brackets)... So I don't want to have to recopy all that code because it will end up being copy/pasted about 20 times then I have to go and edit it all...
Thanks in advance for the help!