title: Abstract class & method Java
body: <p>I have an abstract generic class <code>Class1</code> with a method <code>A</code>.
  A second class <code>Class2</code> extends from this <code>Class1</code> and implements a method <code>B</code>.
  Is it possible to call the method <code>A</code> to build the method <code>B</code> ?</p>
  
  <pre><code>public static int B() {
      Object o = A();
      return 0;
  }
  </code></pre>
  
  <p>I have the error : <code>non-static method A() cannot be referenced from a static context</code>.</p>
  
  <p>The Class1 :</p>
  
  <pre><code>public interface Class1&lt;T extends Object, ID extends Serializable&gt; {
  
      public T A();
  }
  </code></pre>
  
  <p>the Class2 :</p>
  
  <pre><code>public interface Class2 extends Class1&lt;MyEntity,Long&gt; {
  
      public static MyEntity B() {
          MyEntity o = A();
          // some works
          return o;
      }
  }
  </code></pre>