4. Rewrite the reverse method in Fig. 14.6. Reverse a string by placing its last character at the beginning of the reverse of the substring that contains the entire string except for its last character. Test your program 1 class Recursion4 3 4 5 6 public static void main(String[1 args) System.out.println (reverse()) System.out. printIn(reverse(“A”)); System.out.println (reverse ( “ABCDEF”)); /I null string 1 1-char string // multi-char 8 9 10 public static String reverse (String
OR
OR