Java (Basics)
Quiz by Yauhen Arnatovich
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
How many instances can be created for an abstract Java class?
1
∞
0
2
30s - Q2
What is the output of the following Java code?
5.0
4.5
4.0
4
60s - Q3
Choose the incorrect Java code statement below.
char c = 'a';
char c = 255;
char c = "b";
char c = '\n';
30s - Q4
What is the output of the below Java code?
A
66
65
67
60s - Q5
Does the below Java program compile with error?
Yes
No
60s - Q6
What is True about a Java String object?
A String object represents a string in the UTF-16 format
All statements are True
String objects are constant; their values cannot be changed after they are created
String objects are immutable
60s - Q7
What is the output of the Java program below?
true,false
false,false
true,true
false,true
60s - Q8
What is the output of the Java program below?
Runtime Error
Base::show() called
Derived::show() called
Compilation Error
60s - Q9
What is the output of the Java program below?
Runtime Error
Same
Compilation Error
Not same
30s - Q10
What is the output of the Java program below?
2001,1001
2001,1002
2002,1002
2002,1003
300s - Q11
What is the output of the Java program below?
10,10
20,10
20,20
10,20
60s - Q12
What is True about the "final" keyword in Java?
All statements are True
When a method of a class is final, it can not be overridden in a subclass
When a variable is final, it can be assigned value only once
When a class is made final, it cannot be extended
60s - Q13
What is the output of the Java program below?
Compilation Error
3
2
4
120s - Q14
What is the output of the Java program below?
1234004321
4321000112123
4321001234
1234001121231234
300s - Q15
What is the output of the Java program below?
96
59
95
99
300s