Question: what is the difference between double and float variables in java?
Answer: Difference between float and double variable in Java? Though both float and double datatype are used to represent floating-point numbers in Java, a double data type is more precise than float. A double variable can provide precision up to 15 to 16 decimal points as compared to float precision of 6 to 7 decimal digits.