public class recursion{
public static void Fibbo(String str,int n){
if(n==0){
System.out.println(Str.charAt(n));
}
System.out.println(Str.charAt(n));
Fibbo(Str,(n-1));
}
public static void main(String args[]){
String Str="abch";
int n=(Str.length()-1);
Fibbo( Str, n);
}
}
0 Comments