- It is a contract that specifies the methods a class must implement without providing the implementation details.
- Example: An
Animalinterface may have methods likeeat()andsleep(), and classes likeDogandCatcan implement these methods differently.
Leave a Reply