Q.

What is the error in this code? byte b = 50; b = b * 50;

A. b can not store the result 2500, limited by its range.
B. * operator has converted b * 50 into int, which can not be converted to byte without casting.
C. b can not contain value 50.
D. No error in this code
Answer» B. * operator has converted b * 50 into int, which can not be converted to byte without casting.
3.7k
0
Do you find this helpful?
5

View all MCQs in

Java Programming

Discussion

No comments yet