Solution: Try-Catch
We'll cover the following...
We'll cover the following...
import java.util.Scanner;– imports the Scanner class for reading user input.import java.util.InputMismatchException;– imports the exception used when invalid input types are entered. ...