title: What does "error: '.class' expected" mean and how do I fix it
body: <p>Occasionally, new users encounter the following rather obscure compilation error <code>'.class' expected</code>:</p>
  
  <pre><code>double d = 1.9;
  int i = int d;  // error here
           ^
  error: '.class' expected
  </code></pre>
  
  <p>Some Java IDE compilers state this slightly differently; e,g,</p>
  
  <pre><code>error: insert ". class" to complete Expression 
  </code></pre>
  
  <p>What do errors like this <em>actually mean</em>, what causes them, and how should you fix them?</p>