
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
20 questions
Uji Kompetensi Jaringan Komputer

Quiz
•
University
30 questions
OOP-Unit 1,2,3

Quiz
•
University
27 questions
IFR Navaids - Pressure Instruments

Quiz
•
University
25 questions
Engineering Economics - Elements (Exercise 3)

Quiz
•
University
21 questions
Hair Design and Tools Quiz

Quiz
•
11th Grade - University
25 questions
AI ML -- AGENTS

Quiz
•
University
30 questions
LONG QUIZ I_Computer Acoustic Simulation

Quiz
•
University
20 questions
Prelim Exam in Theology 4

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University