class Example { public static void main(String[] a) { Result(30); } public static void Increment(Integer N) { N = new Integer(N.intValue() + 1); } public static void Result(int x) { Integer X = new Integer(x); Increment(X); System.out.println("New value is " + X); } }