Array increment operator
- by Stardust
Could any one please tell me the meaning of "++" with array in the following code in Java:
int [ ] arr = new int[ 4 ];
for(int i = 0; i < arr.length; i++){
arr[ i ] = i + 1;
System.out.println(arr[ i ]++);
}
what is arr[ i ]++ meaning in above code, and why we can't do like:
arr[ i ]++ = i + 1;