title: Convert float to String and String to float in Java
body: <p>How could I convert from float to string or string to float?</p>
  <p>In my case I need to make the assertion between 2 values string (value that I have got from table) and float value that I have calculated.</p>
  <pre><code>String valueFromTable = &quot;25&quot;;
  Float valueCalculated =25.0;
  </code></pre>
  <p>I tried from float to string:</p>
  <pre><code>String sSelectivityRate = String.valueOf(valueCalculated);
  </code></pre>
  <p>but the assertion fails</p>