title: The type of an expression must be an array type, but it is resolved to Object
body: <p>I expected this to compile, but I kept getting the error "The type of an expression must be an array type, but it is resolved to Object". Is there a simple workaround for this?</p>
  
  <pre><code>public class NodeTest {
      public static void main(String[] args) {
  
      Object[] arr = new Object[5]; // each element of object will be an array of integers.
      for(int i = 0; i &lt; 5; i++){
          int[][] a = new int[2*(i+1)][2*(i+1)];
          arr[i] = a;
      }
      arr[0][0][0] = 0; //error here
  }
  </code></pre>
  
  <p>}</p>