Question: 1 public class Ch16Exo 2 3 private static int[] array = {1,2,3,4,5,6,7}; 5 6 public static void main(String [] args) 7 { 8 /* Iterative
![1 public class Ch16Exo 2 3 private static int[] array =](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f46429588aa_45666f46428d31e8.jpg)
1 public class Ch16Exo 2 3 private static int[] array = {1,2,3,4,5,6,7}; 5 6 public static void main(String [] args) 7 { 8 /* Iterative way 9 for(int e: array) System.out.println(e); 11 */ 12 13 // Recursive 14 printRecursion(array.length); 15 } in W NO 00vu+WNP 16 17 public static void printRecursion(int i) { 18 } 19 20 } Figure 1: Print array using recursion Please finish the printRecursion() method. The output should be 1,2,3,4,5,6,7. (You should use recursion to solve this problem. You can use other programming language)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
