MCQ Single Best Answer Not Set

QWhich is true?

ID: #2251 Inheritance in Java MCQ 2,361 views
Question Info
#2251Q ID
Not SetDifficulty
Inheritance in Java MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A "X extends Y" is correct if and only if X is a class and Y is an interface
  • B "X extends Y" is correct if and only if X is an interface and Y is a class
  • C "X extends Y" is correct if X and Y are either both classes or both interfaces
  • D "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces
Correct Answer: Option C

Explanation

"X extends Y" is correct if X and Y are either both classes or both interfaces

Share This Question

Challenge a friend or share with your study group.