IT102 JAVA SCANNER Flashcards
When coding you often need to get information from the user. In Java you can use ______ ____to do this.
Scanner Class
Java Scanner helps you to read different types of ____like____,____,____
data , numbers(int, double), text(string), and true/false values(boolean)
The Scanner class is part of the _____.
java.util package.
The Scanner takes the user’s input and splits it into smaller parts, called _____. It usually uses whitespaces to separate these parts.
tokens
The Scanner takes the user’s input and splits it into smaller parts, called tokens. It usually uses _____ to separate these parts.
whitespaces
System: This is the ___ __ ____ in Java
Scanner: This is the name of the class
scannerName : This is the name you give to your Scanner object. You can choose any name, like input, scanner, or reader.
built in class
____: This is the built in class in Java
Scanner: This is the name of the class
scannerName : This is the name you give to your Scanner object. You can choose any name, like input, scanner, or reader.
System
System: This is the built in class in Java
____: This is the name of the class
scannerName : This is the name you give to your Scanner object. You can choose any name, like input, scanner, or reader.
Scanner
System: This is the built in class in Java
Scanner: This is the___ __ ___
scannerName : This is the name you give to your Scanner object. You can choose any name, like input, scanner, or reader.
name of the class
System: This is the built in class in Java
Scanner: This is the name of the class
____- : This is the name you give to your Scanner object. You can choose any name, like input, scanner, or reader.
scannerName
System: This is the built in class in Java
Scanner: This is the name of the class
scannerName : This is the ____ you give to your Scanner object. You can choose any name, like input, scanner, or reader.
name
_____: This creates the Scanner object and tells it where to get its input
System.in: for reading input for the keyboard
A file object: reading data from a file
A string or input stream: means the Scanner can also read data from string or other sources like network data.
New Scanner(inputSource)
New Scanner(inputSource): This creates the ___ ___and tells it where to get its input
System.in: for reading input for the keyboard
A file object: reading data from a file
A string or input stream: means the Scanner can also read data from string or other sources like network data.
Scanner object
New Scanner(inputSource): This creates the Scanner object and tells it where to get its input
____: for reading input for the keyboard
A file object: reading data from a file
A string or input stream: means the Scanner can also read data from string or other sources like network data.
System.in
New Scanner(inputSource): This creates the Scanner object and tells it where to get its input
System.in: for _____ for the ___
A file object: reading data from a file
A string or input stream: means the Scanner can also read data from string or other sources like network data.
reading input—keyboard