class Cat(){
public void eat(){
System.out.println("吃猫粮");
}
}
class Dog(){
public void eat(){
System.out.println("吃狗粮");
}
}
class Bird(){
public void eat(){
System.out.println("吃鸟粮");
}
}
class DuoTaiText1 {
public static void main(String[] args)
{
Car c = new Car();
c.eat();
Dog d = new Dog();
d.eat();
Bird c = new Bird();
b.eat();
//System.out.println("Hello World!");
}
}
提示说class Car()么有{,玩那,那么大的括号看不见那,还报错说没有{ |