title: Java Inheritance - calling superclass method
body: <p>Lets suppose I have the following two classes</p>
  
  <pre><code>public class alpha {
  
      public alpha(){
          //some logic
      }
  
      public void alphaMethod1(){
          //some logic
      }
  }
  
  public class beta extends alpha {
  
      public beta(){
          //some logic
      }
  
      public void alphaMethod1(){
          //some logic
      }
  }
  
  public class Test extends beta
  {
       public static void main(String[] args)
        {
          beta obj = new beta();
          obj.alphaMethod1();// Here I want to call the method from class alpha.
         }
  }
  </code></pre>
  
  <p>If I initiate a new object of type beta, how can I execute the <code>alphamethod1</code> logic found in class alpha rather than beta? Can I just use <code>super().alphaMethod1()</code> &lt;- I wonder if this is possible.</p>
  
  <p>Autotype in Eclipse IDE is giving me the option to select <code>alphamethod1</code> either from class <code>alpha</code> or class <code>beta</code>.</p>