title: Implements method of interface, method call and type cast
body: <p>Consider the followoing code</p>
  
  <pre><code>interface MyInterface{
      void method(String s);// if we write static modifier we have compile error
  }
  class MyClass implements MyInterface{
      public static void main(String[] args){
          myMethod(new Object());//Compile error
      }
      static void method(String s){...}// compile error
      static void myMethod(Number n){...}
  
  }
  </code></pre>
  
  <ol>
  <li>Why we cant define static method in interface? </li>
  <li>Why we cant implements <code>method()</code> with static modifier? </li>
  <li>When we are calling myMethod with reference to Object we have compile error. As i understood, compiler doesnt cast automatically, isnt it?</li>
  <li><p>Consider the following code  </p>
  
  <p><code>Object someObj; 
  ...
  Number n= (Number) someObj;</code></p></li>
  </ol>
  
  <p>What compiler is doing when we cast to <code>Number</code> in this case?</p>