Java Scanner Library

Java Scanner Library

10th - 12th Grade

31 Qs

quiz-placeholder

Similar activities

Quiz 1 EmpTech

Quiz 1 EmpTech

11th Grade

35 Qs

Arduino and Programming Errors

Arduino and Programming Errors

12th Grade

26 Qs

Chapters 1-3

Chapters 1-3

10th - 12th Grade

27 Qs

IMPORT MENGIMPORT

IMPORT MENGIMPORT

10th Grade

26 Qs

AP CS A CH 1 Review

AP CS A CH 1 Review

10th - 12th Grade

27 Qs

UAS Pemodelan Perangkat Lunak XI RPL smt Genap TA 19-20

UAS Pemodelan Perangkat Lunak XI RPL smt Genap TA 19-20

11th Grade

30 Qs

Computer Hardware (Motherboard,RAM,ROM)

Computer Hardware (Motherboard,RAM,ROM)

9th - 12th Grade

28 Qs

Hardware and Software Fundamentals

Hardware and Software Fundamentals

10th - 11th Grade

30 Qs

Java Scanner Library

Java Scanner Library

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Hard

Used 107+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?