mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 12:41:58 -05:00
12 lines
271 B
Java
12 lines
271 B
Java
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();
|
|
}
|
|
} |