title: Printing an array object using a simple print method
body: <p>How can I refer to the object on which I'm implementing the instance method. I wrote a class called <code>MatrixMaker</code> that looks like this:</p>
  
  <pre><code>package one;
  
  public class MatrixMaker {
  
  private int rows;
  private int columns;
  
  public MatrixMaker(int m, int n){
      rows = m;
      columns = n;
      double[][] matrix = new double[rows][columns];
  
  }
  
  public void printer(){
      for(int i = 0; i &lt; rows; i++){
  
          for(int j = 0; j &lt; columns; j++){
  
              System.out.print(matrix[i][j]);
          }
          System.out.println();
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I initialized an object in this class using:</p>
  
  <pre><code>MatrixMaker matrix = new MatrixMaker(3,4);
  </code></pre>
  
  <p>My question is how do I use</p>
  
  <pre><code>matrix.printer();
  </code></pre>
  
  <p>to print the array. I can't seem to refer to the contents of the object inside the method <code>printer()</code>. Specifically the line: </p>
  
  <pre><code>System.out.print(matrix[i][j]);
  </code></pre>