mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 20:42:00 -05:00
update:demo2
This commit is contained in:
12
com/study/demo2/Animal_Main.java
Normal file
12
com/study/demo2/Animal_Main.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user