I don't know what's wrong with the do-while loop

Try below code : public static void main(String[] args) { String responded; do{ responded = JOptionPane.showInputDialog(“Do you understand do while loops?”); boolean legitimate = false; do { String number = JOptionPane.showInputDialog(“Choose a number between 0 & 9 to generate \nthe corresponding word to that number or \npress 10 to exit the program”); switch(number) { case … Read more