πŸ“Š JAVA
Q. Which is true?
  • (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
πŸ’¬ Discuss
βœ… Correct Answer: (C) "X extends Y" is correct if X and Y are either both classes or both interfaces

Explanation: A is incorrect because classes implement interfaces, they don't extend them. B is incorrect because interfaces only "inherit from" other interfaces. D is incorrect based on the preceding rules.

Explanation by: Bhagwan Das
A is incorrect because classes implement interfaces, they don't extend them. B is incorrect because interfaces only "inherit from" other interfaces. D is incorrect based on the preceding rules.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
179
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Bhagwan Das
Publisher
πŸ“ˆ
91%
Success Rate