Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

Connect with Universities & Study Abroad Experts Instantly Connect Now


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

Your Valuable Comments Please...

Useful Computer Science EBooks