Simple Inheritance in Java

Below code shows a simple inheritance in java where class Dog inherits all class methods of parent class Animal. Animal Main Class

Dog child class