title: Find the dimensions of a 2D array in java
body: <p>I'm playing around with Arrays in Java and had this doubt. How do I find the dimensions of a 2D array in java? For example, I get an array input from System.in and pass it in another method like this:</p>
  
  <pre><code>Scanner in = new Scanner(System.in);
  int arr[][] = new int[6][6];
  for(int i=0; i &lt; 6; i++){
      for(int j=0; j &lt; 6; j++){
                  arr[i][j] = in.nextInt();
          }
  }
  findSize(arr);
  /*
  *
  *Other code
  *
  */
  findSize(int[] inputArr){
  //I want to find the dimensions of the array here
  }
  </code></pre>
  
  <p>Both dimensions of the array are greater than 0. Appreciate the help.</p>