Discussion About Recursion - All subsequences

This is Discussion thread about Recursion - All subsequences

public static void ss(String s,String asf){
if(s.length()==0){
System.out.println(asf);
return;
}
ss(s.substring(1),asf);
ss(s.substring(1),asf+s.charAt(0));
}

I am just not getting the output in the same order as of in the test case ! what to do

you need to sort them as well.