title: generating Variations without repetitions / Permutations in java
body: <p>I have to generate all variations without repetitions made of digits 0 - 9.</p>
  
  <p>Length of them could be from 1 to 10. I really don't know how to solve it, especially how to avoid repetitions.</p>
  
  <p>Example:
     length of variations: 4
     random variations: 9856, 8753, 1243, 1234 etc. (but not 9985 - contains repetition)</p>
  
  <p>I would be really grateful if somebody can help me with that issue, especially giving some code and clues.</p>