package Chouxiangfangfa;
public class work01 {
public static void main(String[] args) {
Coat c = new Coat();
c.shot();
Cow c2 = new Cow();
c2.shot();
}
}
abstract class Animal{
abstract public void shot();
}
class Coat {
public void shot() {
System.out.println(“咪咪….”);
}
}
class Cow extends Animal{
@Override
public void shot() {
System.out.println("咩咩");
}
}