title: Change a method that uses System.out.print() to work with System.out.println()
body: <p>I have the following code which works perfectly fine:</p>
  
  <pre><code>public static void printTrain(String[][] train, int max_height) {
      // Controls the height, 0 means the top
      for (int i = 0; i &lt; max_height; i++) {
          // Controls the wagon index
          for (int j = 0; j &lt; train.length; j++) {
              if (j != train.length - 1)
                  System.out.print(train[j][i] + " ");
              else
                  System.out.print(train[j][i]);
          }
          System.out.println();
      }
  }
  </code></pre>
  
  <p>However, for my current project I am only allowed to use a special library (Terminal) which only allows me to use <code>Terminal.printLine(...);</code>.</p>
  
  <p>So I have to change the method so that it only uses Terminal.printLine() &lt;=> System.out.println().</p>
  
  <p>This is how far I got:</p>
  
  <pre><code>public static void printTrain(String[][] train, int max_height) {
      StringBuilder trainGraphic = new StringBuilder();
      // Index for the height of a wagon
      for (int i = 0; i &lt; max_height; i++) {
          // Wagon index
          for (int j = 0; j &lt; train.length; j++) {
              if (j != train.length - 1) { // This means you need to print the connector
                  trainGraphic.append(train[j][i]).append(" ++ ");
              } else {
                  trainGraphic.append(train[j][i]).append("    ");
              }
          }
          Terminal.printLine("");
      }
  }
  </code></pre>
  
  <p>No matter what I tried, it didn't work out as expected and always prints it out wrong.
  How do I change the code so it only uses Terminal.printLine()?</p>