Java 45: Handle InputMismatchException when string is input instead of a number using if-statements

Опубликовано: 13 Октябрь 2024
на канале: Selected Topics in IT
5,007
64

Avoid an InputMismatchException when a number is expected but a string ins entered instead - using if-statements.
Based on the changes we did in this program, it now avoids a NumberFormatException.

Checking of empty entries is added to this program in:    • Java 112: Avoid a NumberFormatExcepti...  

Running this program from Android Studio:    • Java 116: Running a standard Java pro...