- 1
How come does the division operation 1/3 in eclipse results in 0.0
2 odpowiedzi
+ 2
...
Well, Eclipse, from what I can gather is a Development Environment for Java.
One Third equals to Zero point Zero ?
This would be True if Eclipse Rounded the result to the closest Whole Integer.
And, as it displays Outputed Numbers as Floats... there you go?
In all Honesty, I am a bit stumped by this too.
So don't take my words for granted.
It was a mere suggestion :)
Good Luck.
0
The answer comes out to be 0.0 because 1 and 3 are int values. U have to typecast them to float or double to get the correct output.