Java ☕ User Input
Interactive Video
•
Information Technology (IT), Architecture
•
12th Grade - University
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What was one of the earliest methods used for input in computers?
Punch cards
Touchscreen
Mouse clicks
Voice commands
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Java class is used to take user input from the keyboard?
KeyboardInput
Scanner
InputReader
ConsoleReader
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first step in using the Scanner class in a Java program?
Write a print statement
Import the Scanner class
Compile the program
Create a Scanner object
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you store user input from the Scanner in a variable?
Use the read() method
Assign it directly to a variable
Use the nextLine() method
Use the input() method
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to read an integer input using the Scanner class?
readInt()
nextInt()
inputInt()
getInt()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you input a string when the program expects an integer using nextInt()?
The program will crash
The program will ignore the input
The program will convert it to an integer
The program will read it as zero
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the simple calculator program, what data type is used to store numbers with decimals?
long
int
float
double
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
16 questions
Subject pronouns in Spanish
Quiz
•
9th - 12th Grade
14 questions
Model and Solve Linear Equations
Quiz
•
9th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade