sry for the title, but why does the title not compile
1. public abstract interface Herbivore {
2. int amount = 10 ;
3. public void eatGrass();
4. public abstract int chew() { return 13; }
5. }
6.
7. abstract class IsAPlant extends Herbivore {
8. Object eatGrass (int season) { return null;}
9. }
thanks for helping
>Solution :
The reason why it not compile
Line 4 does not compile, since an abstract method cannot include a body.
Line 7 also does not compile because the wrong keyword is used. A class implements an interface