How to Store a float Value with 1 decimal point as a float value in java. for (e.g), I'm using the following code to limit the float value to 1 digit after decimal point but as a string so again converted it to float. But, after the conversion receiving a long float value like (value = 2.39725527E11) i need it to be like (value = 2.3) and store it in a float variable as 2.3 not 2.39725527E11
float_str = String.format("%.1f", value);
value = Float.parseFloat(float_str);
System.out.println("value = " + value);