update:demo2

This commit is contained in:
dichgrem
2025-10-31 17:01:12 +08:00
parent af1ea3e24e
commit d765c1a219
8 changed files with 214 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package com.study.demo2;
public class Main {
public static void main(String[] args) {
Animal dog = new Dog("Buddy");
Animal bird = new Bird("Tweety");
dog.makeSound();
dog.move();
bird.makeSound();
bird.move();
}
}