2. What is the result of attempting to compile and run the program? class Question2 { static byte a; static short b; sta
Posted: Fri May 20, 2022 11:34 am
jave .Pelsse The coding and output answer must screenshot from
compiler.
And give the explanation for each output.
2. What is the result of attempting to compile and run the program? class Question2 { static byte a; static short b; static char c; static int d; static long e; static String s; public static void main(String[] args) { System.out.println(a+b+c+d+e+s); } } Coding (from compiler): Output (from compiler): Explanation: (5 marks)
compiler.
And give the explanation for each output.
2. What is the result of attempting to compile and run the program? class Question2 { static byte a; static short b; static char c; static int d; static long e; static String s; public static void main(String[] args) { System.out.println(a+b+c+d+e+s); } } Coding (from compiler): Output (from compiler): Explanation: (5 marks)