I want to change the variable value without changing it directly, In C or C++ we may use pointers or reference variable to do that since no pointer concept in java, how we can do that.
in C we may do like this
int var=10;
int *ptr;
ptr=&var;
*ptr++;
printf("%d",var);
output :11
Is there is any other way to do same thing in java ?
Thanks in advance.