title: Java casting error: unexpected type. required: variable, found: value
body: <p>In Java, I am trying to cast an int into a double and then back an int.</p>
  
  <p>I am getting this error:</p>
  
  <pre><code>unexpected type
            (double)(result) =  Math.pow((double)(operand1),(double)(operand2));
            ^
    required: variable
    found:    value
  </code></pre>
  
  <p>From this code:</p>
  
  <pre><code>(double)(result) =  Math.pow((double)(operand1),(double)(operand2));
  return (int)(result);
  </code></pre>
  
  <p>What does the error message mean?</p>