
inheritance quiz
Authored by D Veena
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
9 questions
Programming with Karel
Quiz
•
9th - 12th Grade
10 questions
Physical Security
Quiz
•
12th Grade
10 questions
Karel Quizzes 1-5 (Command - Start)
Quiz
•
9th - 12th Grade
10 questions
Python Generators
Quiz
•
10th Grade - University
10 questions
C# Programming Quiz
Quiz
•
12th Grade
10 questions
Form 10: Computing
Quiz
•
10th - 12th Grade
10 questions
KS3 Computational Thinking
Quiz
•
KG - University
10 questions
What is Artificial Intelligence?
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade