001package subclass.ex3; 002 003public class M { 004 public static void main(String[] argv) { 005 (new C()).m(); 006 } 007} 008class A { 009 void p() {System.out.println("A.p");} 010} 011class B extends A { 012 void p() {System.out.println("B.p");} 013 void m() { 014 System.out.println("B.m"); 015 this.p(); // static or dynamic binding? 016 super.p(); // static or dynamic binding? 017 } 018} 019class C extends B { 020 void p() {System.out.println("C.p");} 021}