@@ -0,0 +1,487 @@
+package strings.StringSubsequences;%0A%0Aimport java.util.*;%0A%0Aclass StringSubsequences %7B%0A%0A  static List%3CString%3E al = new ArrayList%3C%3E();%0A%0A  static void findsubsequences(String s, String ans) %7B%0A    if (s.length() == 0) %7B%0A      al.add(ans);%0A      return;%0A    %7D%0A    findsubsequences(s.substring(1), ans + s.charAt(0));%0A    findsubsequences(s.substring(1), ans);%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    String s = %22abcd%22;%0A    findsubsequences(s, %22%22);%0A    System.out.println(al);%0A  %7D%0A%7D

print all subsequences of a string