class Animal {
int x,y;
void move(){
System.println("动物都会走");
}
}
class Crab extends Animal{
void move(){
System.out.println("螃蟹横着走");
}
}
class Worm extends Animal{
void move(){
System.out.println("虫子扭动着走");
}
}
public class Demo1{
public static void main(String[] args){
Animal animal = new Animal();
animal.move();
}
}
int x,y;
void move(){
System.println("动物都会走");
}
}
class Crab extends Animal{
void move(){
System.out.println("螃蟹横着走");
}
}
class Worm extends Animal{
void move(){
System.out.println("虫子扭动着走");
}
}
public class Demo1{
public static void main(String[] args){
Animal animal = new Animal();
animal.move();
}
}