Java Scanner Quiz

Quiz
•
Computers
•
11th Grade
•
Medium
Standards-aligned
Grit and Motivation
Used 18+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the Java Scanner class?
To create graphical user interfaces
To read input from various sources
To manage file outputs
To perform mathematical operations
Tags
DOK Level 1: Recall
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method would you use to read a byte value using a Scanner object?
nextByte()
nextInt()
nextDouble()
next()
Tags
DOK Level 1: Recall
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `nextLine()` method of the Scanner class do?
It reads a single character
It reads the next token from the input
It reads the next line of text
It reads an integer value
Tags
DOK Level 1: Recall
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which import statement is necessary to use the Scanner class in Java?
import java.util.Scanner;
import java.util.*;
import java.Scanner;
import Scanner;
Tags
DOK Level 1: Recall
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a new Scanner object to read from standard input in Java?
Scanner scan = new Scanner(System.in);
Scanner scan = new Scanner(System.out);
Scanner scan = new Scanner();
Scanner scan = System.in;
Tags
DOK Level 1: Recall
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method of the Scanner class should be used to check if there is another integer input available?
hasNextInt()
hasNext()
nextInt()
checkInt()
Tags
DOK Level 1: Recall
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of `nextDouble()` when used with a Scanner object?
A string
An integer
A double
A boolean
Tags
DOK Level 1: Recall
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Computer Firmware

Quiz
•
10th Grade - University
20 questions
ULANGAN HARIAN INFORMATIKA KELAS 7

Quiz
•
11th Grade
19 questions
Perangkat Lunak (hardware)

Quiz
•
9th - 12th Grade
20 questions
U01 - Hardware, Software & OS Review

Quiz
•
9th - 12th Grade
11 questions
LEMBAR PENILAIAN PENGETAHUAN

Quiz
•
9th - 12th Grade
10 questions
SISTEM KOMPUTER Kelas 8

Quiz
•
8th Grade - University
12 questions
Categories of Hardware

Quiz
•
7th - 11th Grade
15 questions
DAR Intro to Computers

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade