public class Test { static classB { public int i = 0; public String s = "0"; } publicstatic void main(String[] args) { int i = 0; change1(i); System.out.println(i); //0 String a = "0"; change2(a); System.out.println(a); //0 B b1 = new B(); change3(b1); System.out.println(b1.i + " " +b1.s); //100 100 B b2 = new B(); change4(b2); System.out.println(b2.i + " " +b2.s); //0 0 int[] c1 = new int[]{0}; change5(c1); System.out.println(c1[0]); //100 int[] c2 = new int[]{0};