Java Scanner Library

Java Scanner Library

10th - 12th Grade

31 Qs

quiz-placeholder

Similar activities

Topic 3.1 Introduction to Java

Topic 3.1 Introduction to Java

11th - 12th Grade

31 Qs

Java Certification 1 (2025)

Java Certification 1 (2025)

9th - 12th Grade

26 Qs

2.16.1: Basic Java Review

2.16.1: Basic Java Review

10th Grade

32 Qs

SUMATIF BAB 1 XII RPL

SUMATIF BAB 1 XII RPL

12th Grade

30 Qs

Java Fall Final Review

Java Fall Final Review

9th Grade - University

28 Qs

SKOR A BAHAGIAN A

SKOR A BAHAGIAN A

9th - 12th Grade

26 Qs

CPJ Lesson 0 IE

CPJ Lesson 0 IE

9th - 12th Grade

30 Qs

SAD 1 Decision Structures

SAD 1 Decision Structures

9th - 12th Grade

30 Qs

Java Scanner Library

Java Scanner Library

Assessment

Quiz

Computers

10th - 12th Grade

Hard

Used 105+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?