
inheritance quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
D Veena
Used 1+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to inherit a class in Java?
implement
extends
inherits
derive
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of relationship does inheritance represent in OOP?
Has-a
Uses-a
Is-a
Owns-a
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Animal {
void sound() {
System.out.println("Animal makes sound");
}
}
class Dog extends Animal {
void sound() {
System.out.println("Dog barks");
}
public static void main(String[] args) {
Dog d = new Dog();
d.sound();
}
}
Animal makes sound
Dog barks
Compilation error
Runtime error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not true about inheritance in Java?
A subclass inherits all members of the superclass
Private members of the superclass are accessible in the subclass
Constructors are not inherited
A subclass can override non-final methods of the superclass
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following inheritance types does Java support directly?
Multilevel inheritance
Multiple inheritance using classes
Hybrid inheritance
Multipath inheritance
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?
Similar Resources on Wayground
10 questions
Explore Scratch 3: Motion and Pen
Quiz
•
3rd Grade - University
10 questions
Arduino programming
Quiz
•
12th Grade
10 questions
Evaluación de Programación
Quiz
•
12th Grade
10 questions
UTS VOIP
Quiz
•
12th Grade
10 questions
Digital Sound & Video
Quiz
•
9th - 12th Grade
10 questions
11 - Avoiding Copyright Infringement
Quiz
•
9th Grade - University
10 questions
Audio Media Information and Literacy
Quiz
•
12th Grade
10 questions
Kuis - Materi Tentang Pengenalan Komputer
Quiz
•
12th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
