+ 1
What is a float ? please explain with example
4 Respostas
+ 5
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;
+ 2
It's a "floating point" number; a number which has digits after the decimal point. 73 is an integer. -12 is also an integer. 12.5, 659.342 and -0.000003218 are floats.
+ 1
It's a "floating point" number; a number which has digits after the decimal point. 73 is an integer. -12 is also an integer. 12.5, 659.342 and -0.000003218 are floats.
0
float is data type which is used to represent floating point value or number