volume_mute

What is the difference between float and double data types in Java?

publish date2020/09/16 01:01:00 GMT+10

volume_mute

Correct Answer

float provides less decimal points than double

Explanation

Both double and float data type 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 16 decimal points as compared to float precision of 7 decimal digits.

Reference

www.educba.com


Quizzes you can take where this question appears