Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

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

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
Assam Direct Recruitment Test Series

Computer Science Topics