4 Replies Latest reply: May 2, 2008 3:40 AM by 807591 RSS

    How can I call a overloaded base class's methods from the subclass.

    807591
      Insert a line of code at the indicated location, that will call the print() method in the Base class?
      
      class Base {
          public void print() {
              System.out.println("base");
          }
      }
      class Extension extends Base {
          public void print() {
              System.out.println("extension");
              // Insert a line of code here.
          }
      }
      public class Q294d {
          public static void main(String[] args) {
              Extension ext = new Extension();
              ext.print();
          }
      }