How to create reference to a primitive :
This is from Page 21 RH Guide for JCP Exam,
I couldn't make out what this means:
Can someone explain the code for me please :
public class PrimitiveReference {
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]++;
}
}
Thanks
Divya