class MainClass extends SuperClass { String s = "this"; public static void main(String[] args) { new MainClass(); } MainClass() { super.display(s); } void display(String s) { System.out.println("this: " + s); } } class SuperClass { String s = "super"; void display(String s) { System.out.println("super: " + s); } }