/* Example of Parallel Arrays */ class ArrayMidsems { public static void main (String arg[]) { int[] rollNum= {6016, 6024, 6078}; double[] midsemMarks = {61.7, 54 , 74.2 }; String[] name = {"Abhishek A", "Abhishek S", "Ankit"}; int maxIndex = findMaxIndex(midsemMarks); System.out.println ("Highest marks, by "+name[maxIndex]+ " (Y"+rollNum[maxIndex]+") = "+midsemMarks[maxIndex]); } /** finds the index of the person with maximum marks */ public static int findMaxIndex (double numbers[]) { double max = numbers[0]; int index = 0; for (int i=1; i max) { max = numbers[i]; index = i; } } return index; } public static void printArray (String[] arr, int length) { for(int j=0;j