Question: For the following program, type wrong if there are any errors on that line, otherwise type correct. (2 pts) public class StaticDemo { private int
For the following program, type wrong if there are any errors on that line, otherwise type correct. (2 pts) public class StaticDemo { private int i = 2; private static int k = 0; public static void main(String[] args) { i = 20; // wrong int x = method2(1, 2); // correct method1(); // correct public void method10) { i += k + method2(1,2); // wrong public static int method2(int x, int y) { return (x + y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
