Q. What is the error in this code? byte b = 50; b = b * 50; (Solved)

1. b can not store the result 2500, limited by its range.

2. * operator has converted b * 50 into int, which can not be converted to byte without casting.

3. b can not contain value 50.

4. No error in this code

  • b. * operator has converted b * 50 into int, which can not be converted to byte without casting.
Subscribe Now

Get All Updates & News