class Solution { public int[] solution(int[] array) { int[] answer = {}; int max = array[0]; int maxIndex = 0; for ( int i = 0 ; i < array.length-1 ; i ++){ if(array[i] < array[i+1]){ max = array[i+1]; maxIndex = i+1; } } answer = new int[2]; answer[0] = max; answer[1] = maxIndex; return answer; } }