title: How to genearte the random number in increasing order
body: <p>I would like to generate random numbers in ascending order, for instance: <code>0, 2, 3, 5 .. 100</code>, but not <code>2, 0, 5 ..</code></p>
  
  <p>This is what I came up with so far:</p>
  
  <pre><code>public static int vol=5;    
  public static void main(String[] args) {
      int randno = getRandNum();
      vol = vol+randno;   
      System.out.println(getRandNum());
  }   
  private static  int getRandNum() {
      Random r = new Random();
      for (int i =0; i&lt;10; i++)
      {
          int v=r.nextInt(vol);
          System.out.println("r"+v);
      }
      return vol;
  }
  </code></pre>
  
  <p>How could I achieve the goal stated above?</p>