title: 2D Array Method Text Formatting
body: <p>I'm new to Java and recently learned how to use loops and array.
  It took me quite a while but now I got the numbers in the right index and print orders. My only issue is that it's printing without aligning to each other. (like in a table - row/column) </p>
  
  <p>I found out about </p>
  
  <pre><code>System.out.format("%-4d", table[t][i]);
  </code></pre>
  
  <p>of "Roby Cornelissen" on stackoverflow, but since I need a return and on top of that don't use the array but a variable, I'm out of ideas. String.format didn't seem to work for me either, or I used it wrong.</p>
  
  <p>Here is my method:</p>
  
  <pre><code>    public String generateBoard(){
          int total = board.length * board[0].length;
          int zaehler = 0;
          String line = "&lt;html&gt;";
              for( int row = 0; row &lt; board.length; row++){
                  zaehler = ( total + 1 ) - ( (row + 1 ) * board[row].length );
                  for  ( int col = 0; col &lt; board[row].length; col++){
                      board[row][col] = zaehler++;
                      line = line + board[row][col] + " ";
                  }
                  line = line + "&lt;br&gt;";
              }
          line = line + "&lt;/html&gt;";
          return (line);
  
  }
  </code></pre>
  
  <p>I appreciate every help / tips.</p>