Difference between float and double?
5 pts.
0
Q:
Difference between float and double?
float f=1.2f; 
double d=1.2;

 if(f>d)

 { 

  System.out.println("Welcome");

 } 

 Output:
Welcome.



 Why float is bigger than double while both have the same 1.2 value?


Software/Hardware used:
Java
ASKED: Sep 25 2009  6:10 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
3200 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
I think you are supposed to look in the books to answer homework .


It's quicker, annoys us less, and improves the signal to noise ratio of forums such as this.




:-)
.
Last Answered: Sep 25 2009  8:48 AM GMT by Yorkshireman   3200 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0