Look at the bottom of your do-while
loop:
do
{
if (input.equals("a"))
{
System.out.println("a [Input three integers to ititialze a table:] ");
int newTable = in.nextInt();
}
// … more if-else statements
} while (!input.equals("q"));
It keeps printing that statement because after the if-else statement finishes, the value of input
still equals "a" since you haven't changed the value of input
.
Perhaps you want the user to enter new input
before the while loop checks again.
// … more if-else statements
input = in.nextLine(); // <-- add new user input
} while (!input.equals("q"));
And as Juned Ahsan has already said you need to add more code within that first if
statement to print the other commands that you mentioned.