
OOPs Quiz - Advanced

Quiz
•
Other
•
University
•
Easy
Crackify Crackify
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code? class Test { int x; Test(int x) { this.x = x; } void print() { System.out.println(x); } } Test t = new Test(5); t.print();
5
0
Error
null
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which keyword is used to call a superclass constructor?
this
super
extends
base
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code? class A { A() { System.out.println("A's Constructor"); } } class B extends A { B() { System.out.println("B's Constructor"); } } new B();
B's Constructor
A's Constructor
A's Constructor B's Constructor
Error
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following can be overloaded?
Constructors
Static methods
Main method
All of the above
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the role of a constructor in Java?
Initialize objects
Destroy objects
Create classes
Run threads
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of these is NOT true about abstract classes?
Can have abstract and non-abstract methods
Can be instantiated
Can have constructors
Can have static methods
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which keyword is used to prevent inheritance?
private
static
final
const
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Java Programming Quiz

Quiz
•
University
20 questions
organisation of data

Quiz
•
11th Grade - Professi...
20 questions
Java Simple - 1

Quiz
•
University
22 questions
Java Programming Quiz

Quiz
•
University
20 questions
Round 3

Quiz
•
University
25 questions
round 2

Quiz
•
University
21 questions
Software Engineering Basics

Quiz
•
University
24 questions
PEBO

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University