title: Java float to string conversion with trailing zeros
body: <p>I have a requirement where I am getting a float value in java like the one below</p>
  
  <pre><code>1.1
  1.10
  10.10
  </code></pre>
  
  <p>when I convert this to string, I want it to be in the same way as</p>
  
  <pre><code>"1.1"
  "1.10"
  "10.10"
  </code></pre>
  
  <p>however, when I use the following method, </p>
  
  <pre><code>float fa = 25.50f;//Float.parseFloat("25.5");
          String s = Float.toString(fa);
          System.out.println(s); // i want the output to be 25.50, but it gives me 25.5
  </code></pre>
  
  <p>the result turns out to be the following</p>
  
  <pre><code>"1.1"
  "1.1"
  "10.1"
  </code></pre>
  
  <p>can somebody advise me how to get <code>1.10</code> as <code>"1.10"</code> with the zero in java</p>