Java Scanner Quiz

Java Scanner Quiz

9th Grade

15 Qs

quiz-placeholder

Similar activities

Revision Gr2-2025

Revision Gr2-2025

3rd Grade - University

12 Qs

Alat Proses

Alat Proses

9th Grade

20 Qs

9.1 Homework #3

9.1 Homework #3

9th Grade

20 Qs

computer Lab Manners

computer Lab Manners

5th - 10th Grade

19 Qs

PH SIMKMDIG KD 3.1 Menerapkan Logika dan Algoritma Komputer

PH SIMKMDIG KD 3.1 Menerapkan Logika dan Algoritma Komputer

1st - 10th Grade

20 Qs

แบบทดสอบ 4.1 มารู้จักโปรแกรม Scratch กันเถอะ

แบบทดสอบ 4.1 มารู้จักโปรแกรม Scratch กันเถอะ

7th - 9th Grade

10 Qs

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

9th - 12th Grade

15 Qs

 Unit 4 Advanced AP CSP

Unit 4 Advanced AP CSP

9th - 12th Grade

10 Qs

Java Scanner Quiz

Java Scanner Quiz

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

aditya bulchandani

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which package must be imported to use the Scanner class?

java.lang

java.util

java.io

java.scanner

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to create a Scanner object?

Scanner sc = new Scanner;

Scanner sc = new Scanner(System.in);

Scanner sc = Scanner(System.in);

Scanner(System.in) = new Scanner;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to input an integer value?

next()

nextInt()

nextInteger()

readInt()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to input a decimal (floating-point) value?

nextFloat()

nextDecimal()

nextDouble()

both a and c

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to input a single word (string without spaces)?

nextWord()

nextLine()

next()

read()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to input a complete line including spaces?

next()

nextLine()

readLine()

read()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If we type Hello World and use next(), what will be stored?

Hello

World

Hello World

Nothing

Create a free account and access millions of resources

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?

Discover more resources for Computers