Question: Question 5 (5 points) The method getMark( accepts a student name, the array of student names, the array of test marks, and the test number

Question 5 (5 points) The method getMark( accepts a student name, the array of student names, the array of test marks, and the test number (e.g., for Test 4, the number will be 4). The method returns the student's mark on that test. If the student is not found, the method returns -1. The code is shown belowHowever, it contains one major error. Indicate the statement that contains the error then write the correct statement. public static int getMark (String s, String[] std, int[] [] art, int test) { int x = -1; for (int index = 0; index
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
