public class MainClass{ public static void main(String args[]) { int [] myValue = { 1 }; modifyIt(myValue); System.out.println("myValue contains " + myValue[0]); } public static void modifyIt(int [] value) { value[0]++; System.out.println("in modifyit"+value[0]); } }