title: how to print an empty 2d array without getting a nullpointerexception
body: <p>I am relatively new to <code>Java</code> and for a school project I need to print a 2D array. The base for this project is to print it with values <code>null</code>. But I can't put this into a for loop without getting a <code>java.lang.NullPointerException</code>. Can anybody help?</p>
  
  <pre><code>private int ROWS;
  private int COLUMNS;
  private int WIDTH;
  
  private String[][] sheet;
  private String[][] values;
  private int precision;
  
  public SpreadSheet(int rows, int cols, int width, int precision) {
      this.ROWS = rows;
      this.COLUMNS = cols;
      /*this.WIDTH = width;
      this.precision = precision;*/
  }
  
  public void printSheet(){
      for (int i = 0; i &lt; sheet.length; i++) {
          for (int j = 0; j &lt; sheet[i].length; j++) {
              System.out.println(sheet);
          }
          System.out.println("\n");
      }
  }
  </code></pre>
  
  <p>The main : </p>
  
  <pre><code>import java.util.Scanner;
  public class DemoSpreadSheet {
  
  public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
      SpreadSheet sh = new SpreadSheet(4, 6, 15, 2);
      sh.printSheet();
  }
  
  }
  </code></pre>