What is the output of the following program?

public class testmeth
{
static int i = 1;
public static void main(String args[])
{
System.out.println(i+" , ");
m(i);
System.out.println(i);
}
public void m(int i)
{
i += 2;
}
}

a) 1 , 3
b) 3 , 1
c) 1 , 1
d) 1 , 0
e) none of the above.

Respuesta :

Answe:

none of the above

 

Explanation: non-static method m(i) cannot be cannot be referenced from a static context

 

Explanation:

ACCESS MORE