Hi,
I have been tasked to a string recursive problem for my computer science homework. The task is to write a recursive method with the following signature: public String mirror(String str) that returns a copy of the string, followed by all the letters except the last in reverse order. For example, if given "Saturday", you should return "SaturdayadrutaS".

I have written a java code that does the mirror but I seem to get the complete string together. Hope someone can give me some hints on how to achieve the result using recursion.

This is the code:
public String mirror(String str){
int length = str.length();


//char secondLastChar = Character.toLowerCase(str.charAt(length-1));

if(length <= 1){
return str;
}

else{

char c = str.charAt(length-1);


return c + mirror(str.substring(0,length-1));


}
}