[Java] Simple backtracking solution
java\nclass CombinationIterator {\n    private final List<String> combinations;\n    private int index;\n\n    public CombinationIterator(final String character
```java\nclass CombinationIterator {\n    private final List<String> combinations;\n    private int index;\n\n    public CombinationIterator(final String characters, final int combinationLength) {\n        this.combinations = new ArrayList<>();\n        this.backTrack(characters, 0, combinationLength, new StringBuilder());\n        this.index = 0;\n    }\n    \n    public String next() {\n        return this.combinations.get(this.index++);\n    }\n    \n    public boolean hasNext() {\n        return index < this.combinations.size();\n    }\n\n    private void backTrack(final String s, final int start, final int n, final StringBuilder sb) {\n        if(sb.length() == n) {\n            this.combinations.add(sb.toString());\n        } else {\n            for(int i = start; i < s.length(); ++i) {\n                sb.append(s.charAt(i));\n                backTrack(s, i + 1, n, sb);\n                sb.deleteCharAt(sb.length() - 1);\n            }\n        }\n    }\n}\n\n/**\n * Your CombinationIterator object will be instantiated and called as such:\n * CombinationIterator obj = new CombinationIterator(characters, combinationLength);\n * String param_1 = obj.next();\n * boolean param_2 = obj.hasNext();\n */\n\n/**\n * Your CombinationIterator object will be instantiated and called as such:\n * CombinationIterator obj = new CombinationIterator(characters, combinationLength);\n * String param_1 = obj.next();\n * boolean param_2 = obj.hasNext();\n */\n```
['Java']