java recursive permutation of array