Shared Flashcard Set

Details

Scanner Class
Scanner Class Methods
9
Computer Science
9th Grade
02/03/2023

Additional Computer Science Flashcards

 


 

Cards

Term
nextBoolean()
Definition
Reads a boolean value from the user
Term
nextByte()
Definition
Reads a byte value from the user
Term
nextDouble()
Definition
Reads a double value from the user
Term
nextFloat()
Definition
Reads a float value from the user
Term
nextInt()
Definition
Reads a int value from the user
Term
nextLine()
Definition
Reads a String value from the user
Term
nextLong()
Definition
Reads a long value from the user
Term
nextShort()
Definition
Reads a short value from the user
Term
useDelimiter()
Definition
public Scanner useDelimiter(String pattern)
Sets this scanner's delimiting pattern to a pattern constructed from the specified String.
An invocation of this method of the form useDelimiter(pattern) behaves in exactly the same way as the invocation useDelimiter(Pattern.compile(pattern)).

Invoking the reset() method will set the scanner's delimiter to the default.

Parameters:
pattern - A string specifying a delimiting pattern
Returns:
this scanner
Supporting users have an ad free experience!