What will be the error in the following Java code in Slot 1 Question no 9 Java?
Choose the correct option from below list
(1)b cannot contain value 50
(2)b cannot contain value 100, limited by its range
(3)No error in this code
(4)* operator has converted b * 50 into int, which can not be converted to byte without casting
Answer:-(4)* operator has converted b * 50 into int, which can not be converted to byte without casting
Note:-While evaluating an expression containing int, bytes or shorts, the whole expression is converted to int then evaluated and the result is also of type int. | |