How does Java, Kotlin, and Android handle returning an Array value at a given index while incrementing the index value?
int[] someArray = new int[5];
int index = 0;
int result;
result = someArray[index++];
Which index would be passed to the result? Will it increment index first, then pass it to someArray[1], or will it pass the original value of index to someArray[0] and then increment index?
See: Java documentation, Assignment, Arithmetic, and Unary Operators:
So you’ll get
someArray[0].