title: How to print dot pattern in correct way?
body: <p>This is what I have.</p>
  
  <p>when I omit one of the makePattern(size - 1) in makePattern(int size), I got the bottom half. But I don't know how to get the top half.</p>
  
  <pre><code>public void makePattern(int size){
  
      stringList = new ArrayList&lt;String&gt;();
      if (size == 0){
          System.out.print("");
      }
      else{
  
          makePattern(size - 1);
          System.out.println(dotString(size));
          makePattern(size - 1);
  
      }
  }
  </code></pre>
  
  <p>Helper method</p>
  
  <pre><code>  public String dotString(int x){
      if (x == 1){
          return ".";
      }
      else{
  
          return dotString(x - 1) + ".";
      }
  }
  </code></pre>
  
  <p>main method to test:</p>
  
  <pre><code>   public static void main(String[] args) {
  
      Pattern rP = new Pattern();
  
      int sizePt = 5;
      System.out.println();
      for(int i=1; i&lt;=sizePt; i++) {
          System.out.println("pattern " + i);
          rP.makePattern(i);
          ArrayList&lt;String&gt; pattern = rP.getStringList();
          for(int j = 0; j &lt; pattern.size() ; j++)
              System.out.println(pattern.get(j));
  
          System.out.println();
      }
  </code></pre>
  
  <p>The out put I get:</p>
  
  <p>pattern 1</p>
  
  <pre><code>.
  </code></pre>
  
  <p>pattern 2</p>
  
  <pre><code>.
  
  ..
  
  .
  </code></pre>
  
  <p>pattern 3</p>
  
  <pre><code>.
  
  ..
  
  .
  
  ...
  
  .
  
  ..
  
  .
  </code></pre>
  
  <p>The output that I want is:</p>
  
  <p>i.e. makePattern(3)</p>
  
  <pre><code>.
  
  ..
  
  ...
  
  ..
  
  .
  </code></pre>