System.out.print(String.format("%.1f",floatValue));. This prints the floatValue with 1 decimal of precision ...
stackoverflow.com