View Single Post
Old 2008-01-20, 06:30   Link #1051
monster
Junior Member
 
Join Date: Dec 2005
Quote:
Originally Posted by Cats View Post
@monstert: float isn't a primary primitive. Basically every floating point number is a double! You can have floats if you really need them (development for mobile devices etc), but Java presumes double is your main preference. It's no compiler deficiency, it's there by design. In 99.99% of cases where you would require floating point precision for practical use double would always make more sense.
If that's the case, going back to my example, what about those integer literals that you can pass to a byte or short variable with no problem? Shouldn't there be error as well since the literal is supposed to be int?
monster is offline   Reply With Quote