title: Creating number patterns in java
body: <p>I need to  create these patterns in java according to however many lines the user enters:</p>
  
  <pre><code>1
  12
  123
  1234
  12345
  
  54321
  4321
  321
  21
  1
  
  
       1
      21
     321
    4321
   54321
  </code></pre>
  
  <p>I can do the first two  but I cannot do the third.<br>
  Here is the code for the second:</p>
  
  <pre><code>public static void displayPatternII (int lines) {
  
      for (int i = 1; i &lt;= lines; i++){
          for (int j = lines + 1 - i; j &gt; 0; j--)
              System.out.print (j + " ");
          System.out.println();
      }
  }
  </code></pre>