Question: 2. [3 marks] Assume the candy array stores the number of candy bars sold by a group of children. So, candy[j] is the number of
2. [3 marks] Assume the candy array stores the number of candy bars sold by a group of children. So, candy[j] is the number of candy bars sold by child j. Explain in ten English words or less what the following method does. Answers that use Java code, symbols, or lengthy explanation without any summary will receive a 0. public int doTheThing(int[] candy) { int value1 , value2 - e; I for(int j = 0; j value1) { value1 candy[il: value2 = i; } return value2; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
