1 public static String reverse(String originStr) { 2 if(originStr == null || originStr.length() <= 1) 3 return originStr; 4 return reverse(originStr.substring(1)) + originStr.charAt(0); 5 }