A Scanner is a class in Java that allows the user to read input from various sources, such as the keyboard or a file.
Think of a Scanner as a microphone that listens to what the user has to say and converts it into usable information for the program.
InputMismatchException: This term refers to an exception that occurs when the data entered by the user does not match the expected data type.
nextInt(): 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.
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.