**I want to find the position of the largest int in an array recursively.**

myList = {5, 2, 3 , 1, 22, 4, 9} ;

public int findIndex(int[] myList, int size) { if (size == 1) return size-1; return myList[size-1] > findIndex(myList, size-1) ? size-1 : size ; }

My code produces this output: position 6. Which is wrong.

How do I do this?