0
difference between float and double
5 Réponses
+ 3
Double : from 1 .7e–308 to 1.7e+308
Float : from 3 .4e–038 to 3.4e+038
I hope i have helped. If you need anything more feel free to check tutorialspoint or stack overflow!
+ 2
For better understand open a new java, declear a double and float as
Double dmin = Double.MIN_VALUE, dmax = Double.MAX_VALUE;
and print both the values using System.out.println(dmin + " " +dmax) ;
Do same for float with obious change you'll know the difference
0
can u ple tell the range of float and double
0
tq u so much Mr.Akshay
0
You will see most of the time we use double rather than float in Java . one reason is while initializing float number you have to write 'f' followed by number. float num = 3.12f; while in double, double num = 3.12;