
inheritance quiz

Quiz
•
Computers
•
12th Grade
•
Easy
D Veena
Used 1+ times
FREE Resource
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
Similar Resources on Wayground
10 questions
Perkembangan Teknologi Pada Sistem Sensor

Quiz
•
10th - 12th Grade
10 questions
GADV 03 - Scripting

Quiz
•
9th - 12th Grade
10 questions
Scratch Jr

Quiz
•
8th - 12th Grade
10 questions
Music with Technology S3 (terms, effects and processes)

Quiz
•
7th - 12th Grade
10 questions
Computer components

Quiz
•
12th Grade
10 questions
Symbol Puzzle Recap

Quiz
•
12th Grade
10 questions
Object Oriented Programming

Quiz
•
12th Grade
7 questions
CSC703_T3_Milestone2_PC2.1_2.9_P_ID

Quiz
•
12th Grade
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