int[] test = {1, 2, 3, 4};
int highestVal = 0;
int position = -1;
for (int i = 0; i < test.length; i++) {
if (test[i] > highestVal) {
...