posted 19 years ago
Default type for integral literals is int; for floating point is double.
The compiler automatically narrows integral types (such as to byte in your example), but does not do that for float.
To Etienne's point in next post I'm editing this to add that the compiler automatically narrows integral "literals", not all integral types like the previous sentence may have implied.
[ February 10, 2005: Message edited by: Carol Enderlin ]