Permutations II in Java