What will happen when you compile and run the following code?
public class Main{ private int i = 1; public static void main(String argv[]){ int i = 2; Main s = new Main (); s.someMethod(); } public static void someMethod(){ System.out.println(i); } }
C
You cannot access an instance variable from a static method.