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