title: Returning a 2-Dimensional Array from a method
body: <p>I'm trying to return a 2-dimensional array from a function inside of a class. I don't want to create a new array inside the function because I want to return the same one I've passed into the function.</p>
  
  <p>I've tried creating a new array with the same name, but it says it's already defined within the scope. I've also tried just doing (return plane;) which doesnt work because of incompatible data types. I've also tried (return plane[][];) but that doesnt work either.</p>
  
  <pre><code>public class Airplane {
      private String maxSeats; //used for constructor
      private char[][] plane = new char[13][6]; //array to be passed in
  
   public char create(char[][] plane) {
         plane[13][6]; //this is where I'm unsure what to do
          //initialize them as '*' to start
          for (int i = 0; i &lt;= 12; i++) {
              for ( int k = 0; k &lt;= 5; k++) {
                   plane[i][k] = '*';
              }
  return plane;
          }
  }
  </code></pre>
  
  <p>I'm trying to return the array to be used in another function where I will modify it.</p>