Can a interface extends a class?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of São Paulo, Lives in São Paulo, Brazil.
A Java class can only extend one parent class. Multiple inheritance is not allowed. Interfaces are not classes, however, and an interface can extend more than one parent interface. The extends keyword is used once, and the parent interfaces are declared in a comma-separated list.
2023-06-17 06:42:35
评论(499)
Helpful(122)
Helpful
Helpful(2)

Isabella Kim
QuesHub.com delivers expert answers and knowledge to you.
A Java class can only extend one parent class. Multiple inheritance is not allowed. Interfaces are not classes, however, and an interface can extend more than one parent interface. The extends keyword is used once, and the parent interfaces are declared in a comma-separated list.