class A{
public static String speak(){return "A.speak";}
public String talk(){return "A.talk"; }
}
class B extends A{
public static String speak(){return "B.speak";}
public String talk(){return "B.talk"; }
}
// then in your main()
// employ polymorphism
A mya = new B();
System.out.println( mya.speak()); // static is still A
System.out.println( mya.talk()); // virtual function is B