title: Why doesn't the compiler complain when I try to override a static method?
body: <p>I know that we cannot override static methods in Java, but can someone explain the following code?</p>
  
  <pre><code>class A {
      public static void a() { 
          System.out.println("A.a()");
      }
  }   
  
  class B extends A {
      public static void a() {
          System.out.println("B.a()");
      }
  }
  </code></pre>
  
  <p>How was I able to override method <code>a()</code> in class <code>B</code>?</p>