title: Accessing superclass static method in subclass
body: <p>Since a static method is restricted to a class only why is the subclass using the static method of the superclass in the below code?</p>
  
  <pre><code>public class StaticMethodEg extends Superclass {
      public static void main(String args[]) {
          System.out.println(StaticMethodEg.MyStaticMethod(2313123));
      }
  }
  
  class Superclass {
      public static int MyStaticMethod(int i) {
          Integer value = new Integer(i);
          return value + 1234;
      }
  }
  </code></pre>
  
  <p>output</p>
  
  <pre><code>2314357
  </code></pre>