Java Inheritance

Java Inheritance

University

10 Qs

quiz-placeholder

Similar activities

Chapt.4 - Advanced Data Modeling

Chapt.4 - Advanced Data Modeling

University

15 Qs

Java Inheritance

Java Inheritance

11th Grade - University

10 Qs

Post Test Week 3

Post Test Week 3

University

15 Qs

Objection-Oriented Concepts

Objection-Oriented Concepts

University

10 Qs

JAVA FOR ANDROID-JAVA

JAVA FOR ANDROID-JAVA

University

10 Qs

Enitity Relationship

Enitity Relationship

University

15 Qs

A Level OOP

A Level OOP

12th Grade - University

8 Qs

Inheritance in JAVA

Inheritance in JAVA

University

6 Qs

Java Inheritance

Java Inheritance

Assessment

Quiz

Computers

University

Medium

Created by

A Vijay Kumar

Used 180+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Inheritance is used when the relationship between two classes is a(n) _______ relationship.
"HAS-A"
"PART-OF-A"
"IS-A"
inverse

2.

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

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A class that is inherited is called a ______ .

superclass

Subclass

subsetclass

Relativeclass

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does polymorphism mean?
Changing shapes
Having many forms
Being unchangeable
Easy

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When an object's class is a subclass of a more general class.

Extension

Aggregation

Inheritance

Dependency

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Java statement represents inheritance?

class body inherit Car

class body super Car

class body extends Car

class body this Car

class body override Car

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is/are false about inheritance in Java?

I. A subclass inherits all the methods and variables of the superclass.

II. A subclass can override the methods of its superclass

III. A subclass has access to the private instance variables of the superclass.

I only

II only

III only

I and II only

I and III only

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?