To read input from the user the scanner object must accept _______________ as a constructor.

Java Scanner Library

Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Used 105+ times
FREE Resource
31 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
SISTEM KOMPUTER

Quiz
•
12th Grade
30 questions
PBO - XII RPL (SMKN 1 Cisarua)

Quiz
•
1st - 10th Grade
30 questions
OS-9

Quiz
•
9th Grade - University
26 questions
HTML Forms - CIW SDA Lesson 6

Quiz
•
9th Grade - University
30 questions
SUMATIF BAB 1 XII RPL

Quiz
•
12th Grade
27 questions
Java basic test

Quiz
•
12th Grade
30 questions
Christianson

Quiz
•
11th Grade
26 questions
Computer Maintenance

Quiz
•
8th - 10th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade