public class example {
int i[] = {0};
public static void main(
String args[]) {
int i[] = {1};
change_i(i);
System.out.println(i[0]);
}
public static void change_i(int i[]) {
i[0] = 2;
i[0] *= 2;
}
}
IMO the answer should be 1, but the answer is . Is it because the method change_i is static and the changes happened in this method will be reflected in main(), but int i[]is not declared as static, how it can be 4 in main(). Please explain.