GkSeries.com

Q.

Which of the following line will not compile assuming b1, b2 and b3 are byte variables and J is Int variable?

[A] b1 = 3;
[B] b3 = b1 * b2;
[C] b3 = 10 * b1;
[D] b2 = (byte) j;
Answer & Explanation
Option: [C]

10 is an integer variable and b1 is a byte variable. The multiplication of these two results an integer variable which cannot be stored in b3