title: What does "possible lossy conversion" mean and how do I fix it?
body: <p>New Java programmers are often confused by compilation error messages like:</p>
  
  <blockquote>
    <p>"incompatible types: possible lossy conversion from double to int"</p>
  </blockquote>
  
  <p>for this line of code:</p>
  
  <pre><code>int squareRoot = Math.sqrt(i);
  </code></pre>
  
  <p>In general, what does the "possible lossy conversion" error message mean, and how do you fix it?</p>