View Single Post
Old 2008-01-19, 23:01   Link #1047
monster
Junior Member
 
Join Date: Dec 2005
In Java, why is it that you can initialize a variable of type byte or short with an integer literal (as long as you're within the range of allowed number for that data type) but you can't initialize a variable of type float with a floating-point literal without the suffix "f" or casting the literal as a float, even if it's just 0.0?

EDIT 1: lol, i might be reading something incorrectly.

EDIT 2: ah, i see, never mind.

EDIT 3: wait, i still don't get it.

Last edited by monster; 2008-01-19 at 23:21.
monster is offline   Reply With Quote