PROGRAMMING:Program error correction 2
Program correction. There are errors in the following code, please modify and submit.
###Input format:
###Output format:
###Input example:
```in
nothing
```
###Output example:
```out
animal shout!
wangwang……
Dog is running
```
answer:If there is no answer, please comment
public class Main {
public static void main(String[] args) {
Animal animal = new Dog();
animal.shout();
animal.run();
}
}
class Animal {
void shout() {
System.out.println("animal shout!");
}
}
class Dog extends Animal {
void shout() {
super.shout();
System.out.println("wangwang……");
}
void run() {
System.out.println("Dog is running");
}
}
###Input format:
###Output format:
###Input example:
```in
nothing
```
###Output example:
```out
animal shout!
wangwang……
Dog is running
```
answer:If there is no answer, please comment