0
/ 10
What type of error found on line 3?
public static int minVal(int[] y, int first, int last) { int bestSoFar = y[first]; // line 1 for (int...What type of error found on line 3?
public static int minVal(int[] y, int first, int last) {
  int bestSoFar = y[first];          // line 1
  for (int i=first+1; i<=last; i++)
  {
    if ( y[i] < y[bestSoFar] )       // line 2
       bestSoFar = i;               // line 3
  } // for
  return bestSoFar;                  // line 4
} // method minVal
Your feedback will appear here when you check your answer.