Overview: After pressing enter in the "Press enter to continue..." screen, the program get stuck. It keeps printing the same screen and does not allow another input. Step to reproduce: 1) Start the calculator program 2) Press enter Expected Result: Welcome to Calculator!!! Enter option to process: 1) Normal calculation 2) Number conversion 3) Formulas 4) Settings 5) User guide 6) Exit > Input: " " not vaild Press enter to continue.... Enter option to process: 1) Normal calculation 2) Number conversion 3) Formulas 4) Settings 5) User guide 6) Exit > Actual Result: Welcome to Calculator!!! Enter option to process: 1) Normal calculation 2) Number conversion 3) Formulas 4) Settings 5) User guide 6) Exit > Input: " " not vaild Press enter to continue.... Enter option to process: 1) Normal calculation 2) Number conversion 3) Formulas 4) Settings 5) User guide 6) Exit >Input: " " not vaild Press enter to continue.... Build Date & Hardware: 15-11-2020 on Window 10.0.19041
A duplicated scanner nextline() is run after the user press enter. Removed it now. Problem solved.