0

What is the output of this code?

float a = 0.0f; float b = a; System.out.print(a/b);

20th Mar 2017, 11:06 AM
Tushar
Tushar - avatar
6 Answers
+ 9
NaN.
20th Mar 2017, 12:07 PM
Tashi N
Tashi N - avatar
+ 4
for float data type, there should be a f written after the number.
20th Mar 2017, 1:14 PM
Dev
Dev - avatar
+ 2
error
20th Mar 2017, 3:37 PM
haritha
haritha - avatar
0
This is not a problem.. It's due to i write from my phone.
20th Mar 2017, 11:10 AM
Tushar
Tushar - avatar
0
What is f in 0.0f
20th Mar 2017, 1:09 PM
Tushar
Tushar - avatar