Which is the correct way to inherit and implement the interface? Consider and example, interface is animal and a class is cat that wants to implement interface.

A. Class cat implements animal{}
B. Class cat extends animal{}
C. Class cat import animal{}
D. Class cat inherit animal{}
View Answer

A. Class cat implements animal{}

Leave a Comment