
Inheritance in Java
Authored by Mrs.C. Rathika
Computers
University
Used 221+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following Syntax is used for?
class Subclass-name extends Superclass-name
{
//methods and fields
}
Polymorphism
Encapsulation
Inheritance
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A class that is inherited is called a ______ .
superclass
Subclass
subsetclass
Relativeclass
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Class Cat extends Animal. Which is NOT a valid declaration?
Cat x = new Cat();
Animal X = new Animal();
Cat x = new Animal();
Animal x = new Cat();
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does polymorphism mean?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these cannot be passed down through inheritance?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, each child class can have only one parent.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When overloading a method, the method header ________ .
Must exactly match the header of the method you are overloading.
Must have the same name, but differ in order, number, or type of parameters.
Can differ in name, but must have the same number and order of parameters.
Can be completely different from the method you are overloading, but must have @Override.
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?