Search Header Logo

AP CS A - Java Scanner Input

Authored by Keith Fiore

Computers

9th - 12th Grade

Used 33+ times

AP CS A - Java Scanner Input
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following would correctly define and instantiate a Scanner?

Scanner kb = Scanner(in);

Scanner kb = new Scanner(in);

Scanner new kb = Scanner(in);

Scanner kb = new kb(in);

none of these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Scanner methods can be used to read in a int?

nextInt()

next()

nextInts()

nextDouble()

nextInteger()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Scanner methods can be used to read in a double?

nextInt()

nextDble()

nextDouble()

next()

nextLine()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Scanner methods can be used to read in a String?

nextInt()

nextWord()

nextDouble()

next()

nextLine()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Scanner methods can be used to read in a line of words?

nextInt()

nextDble()

nextDouble()

next()

nextLine()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following statement, var must be defined as which of the following types?

var = keyboard.nextInt();

short

String

double

int

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the following statement, var must be defined as which of the following types?

var = keyboard.nextLine();

short

String

double

int

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?