Modify the given codes to remove the compilation errors. 1. public interface Carnivore { int pieces = 10; public static void eatGrass(); public int chew() { return 13; } } 2. Interface HasWings {...


Modify the given codes to remove the compilation errors.


1. public interface Carnivore {


            int pieces = 10;


            public static void eatGrass();


            public int chew() {


                    return 13;


       }


}



2. Interface HasWings {


               public int getNumberOfWings();


   }


    abstract class Insect implements HasWings {


                        abstract int getNumberOfLegs();


   }


    public class Dragonfly extends Insect {


            int getNumberOfLegs() {


                      return 6;


         }


  }




Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here