If the child class has the same method as the parent class we call it method overriding in java.
Rules for Java Method Overriding
1.method must have same name as in the parent class.
2.method must have same parameter as in the parent class.
3.must be inheritance.