title: in Java, how to delete all 0s in float?
body: <p>I'd like to change float like this way:</p>
  
  <p>10.5000 -> 10.5
  10.0000 -> 10</p>
  
  <p>How can I delete all zeros after the decimal point, and change it either float (if there's non-zeros) or int (if there were only zeros)?</p>
  
  <p>Thanks in advance. </p>