Compile time constant means, it's value is determined at compile time itself.
Conside the following code,
Now in the above code, the value for jj is determined only at run time or in other words, only after the method myMethod runs which happens at run time. To the contrary, when you just say final int jj = 10;, it is a compile time constant.
Hope you got it.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Line 4 fails for the same reason line 3 does. A char is wider than a byte. A char is 16 bits and a byte is only 8 bits. So you would need an explicit cast to get these two lines to compile. But, be aware that loss of data can incur since you would be "chopping off" the left most bits to make it fit.
Also just to let you know. They like it if you would specify the resource of the question you posted. [ December 05, 2006: Message edited by: Greg L Tonn ]
line 3 and 4 gives compile time error due to following
---- All conversions between char and the two integer types byte and short are considered narrowing conversions: the reason being that the conversions between the unsigned type char and the signed types byte or short can result in loss of information. ---