-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
29 lines (23 loc) · 846 Bytes
/
Main.java
File metadata and controls
29 lines (23 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
public class Main {
public static void main(String[] args) {
// Animal redAnimal = new Animal("Red", 30, 30);
// //Animal blueFur = new Animal("Blue", 14, 12);
// Dog pinkDog = new Dog("Yip", "Red", 30, 30);
Animal animal = new Animal();
System.out.println(animal.vocalize());
animal = new Dog();
System.out.println(animal.vocalize());
animal = new Cat();
System.out.println(animal.vocalize());
animal = new Chihuahua();
System.out.println(animal.vocalize());
// if (pinkDog.equals(redAnimal)) {
// System.out.println("They are the same");
// }
// else {
// System.out.println("They are different");
// }
// Chihuahua dog = new Chihuahua();
// System.out.println(dog);
}
}