Easy Tutorial
For Competitive Exams

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

b1 = 3;
b3 = b1 * b2;
b3 = 10 * b1;
b2 = (byte) j;
Explanation:
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
Share with Friends
Privacy Copyright Contact Us