title: How to use an array that was returned from a method in Java
body: <p>I created a method that reads a bunch of numbers from a file, takes the first two numbers to be the row and the column length of the array, then converts the rest of them into integers and places the integers into the two dimensional array:</p>
  
  <pre><code>public static int[][] fillArray(String myFile){
      //uses another class to create a text field
      TextFileInput in = new TextFileInput(myFile); 
  
      int[][] filledArray;
      //uses a method in class TextInputFile to read a line then go to the next line
      String line = in.readLine();
      //int i=0;
      int row, col;
      row = Integer.parseInt(line);
      line = in.readLine();
      col = Integer.parseInt(line);
      filledArray = new int[row][col];
      for(int i=0; i&lt;row; i++){
          for (int j=0; j&lt;col; j++){
              line = in.readLine();
              filledArray[i][j] = Integer.parseInt(line);
          }
      }
      return filledArray;
  }
  </code></pre>
  
  <p>My question is how would I access the individual elements in my multidementional array <code>filledArray</code>? As in, how would I print what's in <code>filledArray[1][3]</code> or add <code>filledArray[1][3]+filledArray[2][3]</code> in the main method?</p>