If you add int wit a byte , what will be the result?
-
Int
-
Byte
-
Float
-
None of the above
A
Correct answer
Explanation
When an int is added to a byte in Java, the byte undergoes widening primitive conversion to int. All arithmetic operations on primitives use binary numeric promotion, where smaller types are promoted to int (or larger if needed). Therefore, the result type is int. Option A is correct (despite capitalization).