class Animal {
public void eat() throws Exception
{
}
}
class Dog2 extends Animal {
public void eat() { }
public static void main(
String [] args)
{
Animal a = new Dog2();
Dog2 d = new Dog2();
d.eat();
a.eat();
}
}
can anyone explain me why is it giving Compiler error