Vidyalelo
Java Programming · Q68

Data Types and Variables

Programming · Java Programming · question 68

Q68

What will be the error in the following Java code? byte b = 50; b = b * 50;

A.
b cannot contain value 100, limited by its range
B.
* operator has converted b * 50 into int, which can not be converted to byte without casting
Answer
C.
b cannot contain value 50
D.
No error in this code

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board