ExamVeda
Login
Home
This question belongs to Java Program Inheritence
Inheritence
?

Which of the following is true?
1. A class can extend more than one class.
2. A class can extend only one class but many interfaces.
3. An interface can extend many interfaces.
4. An interface can implement many interfaces.
5. A class can extend one class and implement many interfaces.

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

3 Comments
Navyasri Erramsetty
Navyasri Erramsetty 5 years ago
Here only 2 and 5 are correct.. 3 is not correct because a class can never extend a interface it only implements any number of interfaces. And here 2 is correct because a class can extend only one class but implement many interfaces.
Ummadi Veena
Ummadi Veena 9 years ago
3rd statement is correct because there is no parent class for interface. In case of a class , the super class is object class.
Ex: class A extends Interface1, Interface2, Interface3..... Hence multiple interfaces can be inherited.
Niroshan Kumarasamy
Niroshan Kumarasamy 10 years ago
can you give simple example of An interface can extend many interfaces?