@@ -0,0 +1,1056 @@
+public class Program %7B%0A    public static void main(String%5B%5D args) %7B%0A        ArrayList%3Cstring%3E combinations = getCombinations(%22abc%22);%0A        %0A        assert permutations.size() == 7;%0A        assert permutations.contains(%22a%22);%0A        assert permutations.contains(%22b%22);%0A        assert permutations.contains(%22c%22);%0A        assert permutations.contains(%22ab%22);%0A        assert permutations.contains(%22ac%22);%0A        assert permutations.contains(%22bc%22);%0A        assert permutations.contains(%22abc%22);%0A%0A  %09    System.out.println(%22Tests passed%22);%0A    %7D%0A    %0A    public ArrayList%3CString%3E getCombinations(String text) %7B%0A        ArrayList%3CString%3E results = new ArrayList%3CString%3E();%0A        for (int i = 0; i %3C text.length(); i++) %7B%0A            // Record size as we will be adding to the list%0A            int resultsLength = results.size();%0A            for (int j = 0; j %3C resultsLength; j++) %7B%0A                results.add(text.charAt(i) + results.get(j));%0A            %7D%0A            results.add(Character.toString(text.charAt(i)));%0A        %7D%0A        return results;%0A    %7D%0A%7D%0A

Create Program.java