title: I don't know how to cast to float in Java
body: <p>I'm porting some code over from Processing to Java, and one issue I've come across is that processing's precompiler turns any doubles to floats. In Eclipse however, I've had to explicitly cast my values as float. Still though, I get errors that I don't understand. For instance, shouldn't putting an f at the end of this statement fix the type mismatch (Type mismatch: cannot convert from double to 
       float)?</p>
  
  <pre><code>    springing[n] = .05*(.17*(n+1))f; 
  </code></pre>
  
  <p>And even on simpler statements like this I get a type mismatch. What am I doing wrong?</p>
  
  <pre><code>  float theta = .01f;
  </code></pre>