run this code you will get whatever you want
public class example {
int i[] = {0};
public static void main(
String args[]) {
int i[] = {1};
System.out.println(change_i(i));
}
public static int change_i(int i[]) {
int j[] = {2};
i = j;
return i[0] ;
}}