
JPE Quiz 2
Authored by Trung Dang
Computers
1st - 7th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following code print when compiled and run?
0 10
10 10
10 0
5 5
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following program print when compiled and run:
It will not compile.
Value is null
Value is ""
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following code print when compiled and run:
d2 val = d2
val = default
d2 val = D1
Exception at run time
4.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which set of statements result in ClassB and ClassC being derived from ClassA? (Choose two)
class ClassB extends ClassA {}
class ClassB extends ClassC {}
class ClassA extends ClassB {}
class ClassC extends ClassB {}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Final methods can be overridden ?
True
False
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following access control keywords can be used to enable all the subclasses to access a method defined in the base class? (Choose two)
public
private
protected
No keyword is needed
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many times will the output contain 2?
1
2
3
4
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?