public static String reverse(String s) {
if (s == null) {
return s;
}
int i = s.indexOf(" ");
if (i == -1) {
return s;
}
return reverse(s.substring(i + 1)) + " " + s.substring(0, i);
}
public static String getLastChar(String str){
if(str == "" || str == null || str.length() <= 1)
return str;
int length = str.length();
return str.charAt(length -1) + getLastChar(str.substring(0,length-1));
}