What data type or types will allow the following code snippet to compile?
Choose all that apply
byte x = 5; byte y = 10; _____ z = x + y;
A, B, D.
The value x + y is automatically promoted to int, so int and data types that can be promoted automatically from int will work.
Options A, B, D are such data types.
Option C will not work because boolean is not a numeric data type.
Options E and F will not work without an explicit cast to a smaller data type.