I am writing a calculator program in Java using Android Studio.
I have a try/catch block in my program, with the catch block catching a NumberFormatException for invalid input.
} catch (NumberFormatException e) {
}
Without this try/catch block and I don't handle the exception of a user entering invalid input, a message pops up saying "Unfortunately, CalculatorApp has stopped" and the app closes.
With this exception, upon entering invalid input the app doesn't close (good!) but nothing happens when the user clicks he enter button.
How do I make it so a message pops up upon catching the exception?