title: Why doesn't the following codes cause "unchecked cast" warning?
body: <p>I think that <code>(String)x</code> is an unchecked cast, but the compiler does not give any  warning. Why does it happen?</p>
  
  <pre><code>public static void main(String[] args) {
          Object x=new Object();
          String y=(String)x;
      }
  </code></pre>