
Java II Primitive Types
Authored by Lisa Shifflett
Computers
10th - 12th Grade
Used 50+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is not a primitive type?
int
double
String
boolean
char
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following statements is true about variables?
The memory associated with a variable of a primitive type holds an actual primitive value
When a variable is declared final, its value can only be changed thorugh a direct reassignment.
A variable originally created as an int can be changed to store a double through casting.
All of these choices are true
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the value of x after this code runs?
int x = 5;
x = 10;
x = 4;
5
10
4
true
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the proper syntax to declare and initialize a variable called temperature to have the value 70.4?
int temperature = 70.4;
double temperature = 70.4;
temperature = 70.4;
String temperature = 70.4;
temperature = (double) 70.4
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the result of this expression?
(int) (5 + 2 / 3 + 1)
5
6
6.67
7
0
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which expression returns the 1’s place of an integer x?
x % 10
x / 10
x % 100
x + 1
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the value of myInteger after this line of code is executed?
int myInteger = (int) 5.6;
6
5.6
5
9
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?
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade