dw5304
03-24-2005, 06:19 PM
how would i take
public String reversal(String x){
int y = x.lenght();
String s =""
for(Int j=y-1;j>=0;j--)
s+=x.charAt(j);
return s;
}
and write a recursive function for it to do the same thing?
public String reversal(String x){
int y = x.lenght();
String s =""
for(Int j=y-1;j>=0;j--)
s+=x.charAt(j);
return s;
}
and write a recursive function for it to do the same thing?