Hi Randy,
float f1 = 1.0 --> compile error
Just for formality, from Sun's Java tutorial: "A series of digits with a decimal point is of type double. You can specify a float by putting an 'f' or 'F' after the number."
byte b1 = 129 --> compile error
Ditto with Corey and Valentin. But let's just reminisce about the basics: how do you determine the range? Since a byte has a size of 8 bits, you can determine it manually by multiplying 2 (a bit has 2 possible values, "1" or a "0", or "true" or "false") eight times (or 2 raised to the power of eight), which equals 256. Thus the range of values for the byte data type is -128 to 127 inclusive, which does not include 128. Why just 127? because you have to sneak in the special number "0" to the range (...,-1,
0, 1,...).
Ex Animo Java!
-- Val
[ April 17, 2002: Message edited by: Val Pecaoco ]