
Java Scanner Library
Quiz
•
Computers
•
10th - 12th Grade
•
Practice Problem
•
Hard
Used 107+ times
FREE Resource
Enhance your content in a minute
31 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To read input from the user the scanner object must accept _______________ as a constructor.
System.in
A string
A file name
A file object
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which correctly creates a scanner object?
Scanner objectName = Scanner ();
Scanner objectName = new Scanner ();
Scanner objectName = Scanner (System.in);
Scanner objectName = new Scanner (System.in);
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
The Scanner method used to read a string value from the user is: (tick ALL correct options)
next()
nextString()
nextLine()
Next()
NextLine()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Scanner can get a whole number from the user using:
next()
nextInterger()
nextInt()
readInt()
readInteger()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To read input from a data file the scanner object must accept _______________ as a constructor.
System.in
A string
A file name
A file object
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
nextDouble is used to read in:
Whole number
Number with a decimal point
Text
A True / False value
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The purpose of hasNextInt is:
to check that the input is a Whole number
to check that the input is a number with a decimal point
to check that the input is text
to check that the input is a True / False value
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
27 questions
Chapters 1-3
Quiz
•
10th - 12th Grade
27 questions
AP CS A CH 1 Review
Quiz
•
10th - 12th Grade
30 questions
D&T Challenge 1
Quiz
•
9th - 12th Grade
27 questions
Sumatif 3 Isaac - CorelDraw
Quiz
•
11th Grade
30 questions
UAS Pemodelan Perangkat Lunak XI RPL smt Genap TA 19-20
Quiz
•
11th Grade
35 questions
Quiz 1 EmpTech
Quiz
•
11th Grade
30 questions
Systems Architecture
Quiz
•
8th - 10th Grade
26 questions
Звук 2-12
Quiz
•
9th - 10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
