title: Static method calls to derived types over virtual implementations? (Android)
body: <p>I have class A, with methods foo and bar, that are implemented by A1 and A2. The functionality in both A1 and A2 is the same. In other words:</p>
  
  <pre><code>   public class A {
         public int foo() { return 0; };
         public int bar() { return 1; };
     }
  
      class A1 extends A {      
          public int AnotherFooFunction() { return foo(); }
          public int AnotherBarFunction() { return bar(); }
      }
  
      class A2 extends A { 
          public int AnotherFooFunction() { return foo(); }
          public int AnotherBarFunction() { return bar(); }
      }
  </code></pre>
  
  <p>Is it better to keep the code in this fashion, or to swap out those virtual methods as static methods? (In Java, everything non-final/non-private is considered virtual, right?)</p>
  
  <p>According to the <a href="http://developer.android.com/guide/practices/design/performance.html#prefer_static" rel="nofollow noreferrer">Designing for Performance</a> section in the Android Developer Docs, I should swap out these virtual methods for static ones.  So the above becomes:</p>
  
  <pre><code>   public class A {
          public int foo() { return 0; };
          public int bar() { return 1; };
     }
  
      class A1 extends A {      
          public int AnotherFooFunction() { return A.foo(); }
          public int AnotherBarFunction() { return A.bar(); }
      }
  
      class A2 extends A { 
          public int AnotherFooFunction() { return A.foo(); }
          public int AnotherBarFunction() { return A.bar(); }
      }
  </code></pre>
  
  <p>Is this how it "ought" to be? I fully realize that I may be misinterpreting this paragraph in the docs.</p>