title: Java: pick several different random numbers from array in one time
body: <p>Could someone tell me how can I pick several different random numbers from an array at one time?
  For example, there is a long int array. I want to pick 7 numbers from it. All the numbers mustn't be the same and sort them by increase sequence.</p>
  
  <pre><code>Random random = new Random();
  int a = mixColor[random.nextInt(mixColor.length)];
  int b = mixCoor[random.nextInt(mixCoor.length)];
  int c = mixCoor[random.nextInt(mixCoor.length)];
  int d = mixCoor[random.nextInt(mixCoor.length)];
  int e = mixCoor[random.nextInt(mixCoor.length)];
  while(b!=c &amp;&amp; c!=d &amp;&amp; b!=d) {
     b = mixCoor[random.nextInt(mixCoor.length)];
     c = mixCoor[random.nextInt(mixCoor.length)];
     d = mixCoor[random.nextInt(mixCoor.length)];
  }
  </code></pre>
  
  <p><code>mixColor[]</code> and <code>mixCoor[]</code> are long int arrays. I can do in this way, but if I want to pick more numbers this will be really complicated. And I need to sort them as well. Someone get good ideas?</p>