title: How do I give a two dimensional array 2nd slot "unlimited space"? JAVA
body: <p>If I want to make an array that has different sizes for each inner array, how do I declare it?
  int[][] arr = new int [X][]; (The x being a certain number) gives me null when I try to use it and put things in the array.</p>
  
  <p>However, I want different sizes for each inner array, depending on what I'm trying to input into it. What do I do? Java BTW.</p>
  
  <p>For the code:</p>
  
  <pre><code>    int[][] arr3 = new int [arr1.length+arr2.length][];
      for(int i = 0; i&lt;arr1.length; i = i + 1)
      {
          for(int j = 0; j&lt;arr1[i].length; j = j + 1)
          {
              arr3[i][j] = arr1[i][j];
          }
      }
      for (int i2 = 0; i2&lt; arr2.length; i2 = i2 + 1)
      {
          for (int j2 = 0; j2&lt;arr2[i2].length; j2 = j2 + 1)
          {
              arr3[i2+arr1.length][j2] = arr2[i2][j2];
          }
      }
      return arr3;
  }
  </code></pre>
  
  <p>I want to put arr1 inner arrays and arr2 inner arrays into arr3.</p>