View Single Post
Old 2008-01-20, 06:08   Link #1050
felix
sleepyhead
*Author
 
 
Join Date: Dec 2005
Location: event horizon
@Jinto Lin: Well there is some auto/invisible typecasting done. (pass a int to a method accepting only float and double for example) Personally I don't consider it a good thing since it can be cause for precision errors. Obviously auto-casting double to float would be a huge hole in the language.

@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.
__________________
felix is offline   Reply With Quote