ITE106-A MIDTERM WRITTEN EXAM
Quiz by Seven P. Martinez
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
Which of the following is NOT a primitive data type in Java?
boolean
String
double
int
30s - Q2
What is the correct way to declare a variable named "age" of type integer?
integer age;
Int age;
int age;
age int;
30s - Q3
What is the value of the expression "10 + 5 * 2"?
15
100
20
30
30s - Q4
Which operator is used to compare two values for equality?
>=
==
!=
=
30s - Q5
What is the result of the expression "10 / 3"?
3
3.0
3.333333
3.33
30s - Q6
Which data type is used to store single characters?
int
char
boolean
String
30s - Q7
What is the default value of a boolean variable?
null
false
0
true
30s - Q8
Which keyword is used to define a constant variable?
static
fixed
final
const
30s - Q9
What is the range of values that a byte data type can hold?
-32768 to 32767
-2147483648 to 2147483647
-128 to 127
0 to 255
60s - Q10
Which operator is used to calculate the remainder of a division operation?
%
-
*
/
30s - Q11
What is the correct way to declare a variable named "isHappy" of type boolean?
Boolean isHappy;
bool isHappy;
boolean isHappy;
happy boolean;
30s - Q12
What is the value of the expression "true && false"?
true
0
1
false
30s - Q13
Which operator is used to concatenate two strings?
+
/
*
-
30s - Q14
What will happen if you try to assign a value exceeding the range of a data type to a variable of that type?
The program will compile without any error.
The program will throw a runtime exception.
The variable will be automatically converted to a larger data type.
The value will be truncated to fit within the range.
60s - Q15
Which of these statements correctly describes the difference between the = operator and the == operator?
Both are used for comparison, but == is more strict.
== is used for assignment, while = is used for comparison.
Both are used for assignment, but = is more efficient.
= is used for assignment, while == is used for comparison.
60s