private static int calculateNumberSum(int[] arr, int index)…
private static int calculateNumberSum(int[] arr, int index) is a recursive helper method. It is used to calculate and return the sum of all the numbers in the given array, from the specified index to the end. Implement the calculateNumberSum(int[],int) method by filling in the blanks. You don’t need to consider scenarios where arr is null or index is negative. private static int calculateNumberSum(int[] arr, int index) { if (____________1____________) { return ____________2____________; } return ____________3____________ + calculateNumberSum(____________4____________);} Use this template for your answer (please type fully – you cannot copy): 1: [answer to blank 1] 2: [answer to blank 2] 3: [answer to blank 3] 4: [answer to blank 4]
Read Details