Hi Paramasivum Ramu.
I see that you are battling with Inheritance.
Here is the solution for the Mobile.java which you ask about.
I gave you a reply on the weekend and had the instantiation the wrong way round.
Here is your solution and I am not using static methods at all.
I gave three instantiations.
You can decide which instantiation to use to produce your desired output.
You can email me if you want further explanation on inheritance.
THE MOBILE.JAVA PROGRAM
class Vertibrate{
public void move(){
System.out.println("Move");
}
}
class Mammal extends Vertibrate{
public void move(){
super.move();
System.out.println("Walks");
}
}
class Dog extends Mammal {
public void move(){
super.move();
System.out.println("Walks on paws");
}
}
public class Mobile {
public static void main(
String[] args){
Vertibrate Vertibrates = new Vertibrate();
Vertibrate Mammals = new Mammal();
Vertibrate Dogs = new Dog();
Vertibrates.move();
System.out.println("_____________________");
Mammals.move();
System.out.println("_____________________");
Dogs.move();
System.out.println("_____________________");
}
}