Question JAVA Write a recursive method that takes a String as a parameter and returns a String that is in reverse; you may not use an array. public static String reverse(String str) Two approaches are possible: a. Concatenate the last character to the end of the reversed string b. Concatenate the reversed string to the first character Sample Interaction: Enter a string: ABCDE String reversed: EDCBA

4PM5FI The Asker · Computer Science

JAVA

Transcribed Image Text: Write a recursive method that takes a String as a parameter and returns a String that is in reverse; you may not use an array. public static String reverse(String str) Two approaches are possible: a. Concatenate the last character to the end of the reversed string b. Concatenate the reversed string to the first character Sample Interaction: Enter a string: ABCDE String reversed: EDCBA
More
Transcribed Image Text: Write a recursive method that takes a String as a parameter and returns a String that is in reverse; you may not use an array. public static String reverse(String str) Two approaches are possible: a. Concatenate the last character to the end of the reversed string b. Concatenate the reversed string to the first character Sample Interaction: Enter a string: ABCDE String reversed: EDCBA
Community Answer
WLE4DC

Answer:public static String reverse(String str){ if(str.length()<=1){ return str; } else{ return reverse(st ... See the full answer