
Java Inheritance & Polymorphism Quiz

Quiz
•
Information Technology (IT)
•
University
•
Hard
Viswanath E
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the purpose of inheritance in Java?
To define multiple constructors
To reuse existing code
To create new data types
To hide data from other classes
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which keyword is used for inheritance in Java?
inherit
extends
override
implements
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Can a subclass constructor directly access a private member of its superclass?
Yes, always
No, private members are not accessible
Only using super
Only in the same package
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What happens when both superclass and subclass have a field with same name?
Superclass field is accessed through superclass reference
Compilation error
Java doesn't allow field hiding
Subclass field hides superclass field
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Can we override a method that throws an exception with one that doesn't?
No
Only if both throw same exception
Only if exception is unchecked
Yes
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of these allows multiple inheritance?
Abstract classes
Interfaces
Classes
Constructors
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is an example of polymorphism?
Method Overloading
Declaring interfaces
Using only static methods
Declaring final variables
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Java Quiz in tamil theme by jamal

Quiz
•
University
20 questions
Java Methods Quiz

Quiz
•
University
25 questions
Software Testing in Java

Quiz
•
1st Grade - University
20 questions
03-JavaScript операторы, ветвление

Quiz
•
University
20 questions
Quiz Stand Website

Quiz
•
University
30 questions
Loops, enums,arrays,conditional statements, variables

Quiz
•
University
30 questions
Java OOP Quiz

Quiz
•
University
20 questions
Java Exception Handling Quiz

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade