Question: 1 public class Ch16Exo 2 { 3 4 private static int[] array = {1,2,3,4,5,6,7}; 5 6 public static void main(String [] args) 7 { 8
![1 public class Ch16Exo 2 { 3 4 private static int[]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f454c731327_51866f454c6a70a6.jpg)
1 public class Ch16Exo 2 { 3 4 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) 10 System.out.println(e); 11 */ 12 13 // Recursive printRecursion(array.length); 15 } 16 17 public static void printRecursion(int i) { 18 19 } 20 } 14 5 Figure 2: Print array backwards using recursion 3. Print Array Using Recursion (2). Please finish the printRecursion() method. The output should be 7,6,5,4,3,2,1. (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
