
please help in this java program.... 2345 1345 1245 1235 1234

public class UniqueCombinations {
public static void find(String s) { find("", s); }
private static void find(String prefix, String s) {
if(prefix.length()==4){
System.out.println(prefix);
}
for (int i = 0; i < s.length(); i++)
find(prefix + s.charAt(i), s.substring(i + 1));
}
public static void main(String[] args) {
String st = "12345";
find(st);
System.out.println();
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.