🎴 Flashcard Mode

Java Programming Fundamentals and OOP Concepts

Card1 / 20
Mastered0
Review0
QuestionClick to flip

If we extends class A in Class B they are sharing which relationship?

AnswerClick to flip back
A
Class B 'is-a' Class A
💡 Explanation:

Inheritance represents an 'is-a' relationship. When class B extends class A, B is a subclass of A, meaning 'Class B is-a Class A'. The reverse ('Class A is-a Class B') is incorrect because subclasses have more specific behavior. Composition represents 'has-a'.

Change Mode