<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * This program demonstrates the use of super to call a method
 * of the same name in a superclass, and also that variables
 * may shadow other variables with different types.
 */

public class SuperMethod {
   public static void main(String[] args) {
      new Bar().b();
   }  
}

class Foo {
   protected String a = "Foo";
   protected void b() {
      System.out.println(a);
   }
}

class Bar extends Foo {
   private int a = 13;
   public void b() {
      System.out.println(a);
      System.out.println(super.a);
      super.b();
   }
}

</pre></body></html>