
Java Random Output Quiz
Authored by Jeanette Patterson
Computers
11th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( Math.random() * 3 );
A random double value between 0.0 and 3.0
A random integer value between 0 and 3
A constant value of 1.5
A random double value between 1.0 and 4.0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( (int)(Math.random()*5) + 3 );
An integer value between 3 and 7
An integer value between 0 and 5
An integer value between 1 and 6
An integer value between 2 and 8
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( (int)Math.random()*4 + 5 );
5
6
7
8
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( Math.abs( -5.2 ) );
5.2
-5.2
0
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( (int)(Math.random()*5) + 3 );
3, 4, 5, 6, 7
0, 1, 2, 3, 4
5, 6, 7, 8, 9
1, 2, 3, 4, 5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( (int)(Math.random()*50) );
A random integer between 0 and 49
A random integer between 1 and 50
A random integer between 0 and 50
A random integer between 1 and 49
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What value(s) will be output by the following Java code statement? System.out.println( Math.abs( 6 ) );
6
-6
0
Error
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
11 questions
Programming basics
Quiz
•
10th - 11th Grade
13 questions
LENGUAJE C
Quiz
•
11th Grade
11 questions
Programming Quiz 1
Quiz
•
11th Grade
10 questions
scratch
Quiz
•
11th - 12th Grade
12 questions
Clase de Computación: Excel
Quiz
•
11th Grade
10 questions
Intro to MIL
Quiz
•
11th Grade
10 questions
10 câu kiểu xâu tiết 1
Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade