The following recursive method called z is created. This method accepts two parameters: A string s, and an integer index
Posted: Fri May 20, 2022 5:45 pm
The following recursive method called z is created. This method accepts two parameters: A string s, and an integer index The code in the method is: == if (index s.length()) return ""; <----- base case if(index % 2 != 0) return ""+ s.charAt(index) + z(s, index+1); <---- recursive call else return z(s, index+1); <----- recursive call What would be the output with the call: System.out.println( z("javajavajava ",0)); Enter your answer.