title: How to generate 20 unique random numbers with order using Java?
body: <p>am new to programming and I just started doing a program where I want to generate and sort 20 unique random numbers, how ever I was only able to generate numbers which were not unique nor sorted using this script </p>
  
  <pre><code>import java.util.Random;
  
  class FTW {
      public static void main (String[]args){
          Random I  = new Random();
          int number; 
  
          for(int counter=1; counter&lt;=20;counter++){
              number = I.nextInt(20);
              System.out.println(number + " ");
          }
      }
  }
  </code></pre>
  
  <p>Can any one help me edit this or can give me a better one that does the job and explain it to me if possible :)</p>