public class Ex2 { public void foo(int a, Integer b) { a = 2; b = 3; // auto-boxing } public static void main(String[] args) { int x = 2; Integer y = 2; // auto-boxing Ex2 thing = new Ex2(); thing.foo(x,y); System.out.println("x is "+x+" y is "+y); } }