A Scanner is a class in Java that allows the user to read input from various sources, such as the keyboard or a file.
This term refers to an exception that occurs when the data entered by the user does not match the expected data type.
This method is used with a Scanner object to read an integer value from the input source.
close(): This method is used with a Scanner object to release system resources associated with it.