title: Does casting change the declared/reference type at run-time?
body: <p>First, let me be clear about what I mean by the declared type.
  Assume SuperBoss is a superclass of the class Boss.</p>
  
  <pre><code>SuperBoss mrBond = new Boss();
  </code></pre>
  
  <p>SuperBoss is the declared type, and Boss is the actual type.</p>
  
  <p>Personally, I think the declared type is changed at run-time due to the following run-time exception:</p>
  
  <pre><code>SuperBoss mrWayne = new SuperBoss();
  ((Boss)mrWayne).randomMethod(); 
  
  //Exception: java.lang.ClassCastException: SuperBoss cannot be cast to Boss
  </code></pre>
  
  <p>I know this may seem trivial, but I'm going to be tutoring next quarter, and I don't want to teach the students the wrong thing.  And my professor and her assistant this quarter did not agree with each other on this subject.  My professor believes that casting does indeed completely change the declared type at run-time for a single statement. The T.A. strongly believed that at run-time, the cast is merely checked, but doesn't actually change the declared type.                                                                                             </p>