title: Casting subclasses extending the same original class
body: <p>How can I cast two extends class like that in java?</p>
  
  <pre><code>    class B extends Object{
  
      }
  
      class C extends Object{
  
      }
  
      B b = new B();
  
      C c = (C)b;//Cannot cast from B to C
  </code></pre>