Printing elements of an array of arrays of primitives in Java using Arrays.deepToString( Object[] arr )
<p>I'm having problems in printing the elements of an array of arrays of primitives in Java using the <code>Arrays.deepToString( Object[] arr )</code> method.  If I define <code>arr</code> as <code>int[][] T = { {0,1},{2,1} }</code>, then <code>T[0]</code> and <code>T[1]</code> are the 1D integer arrays [0,1] and [2,1] respectively, and therefore are Java objects.  For example, I thought that <code>Arrays.deepToString( T[0] )</code> would print [0,1]. But I get a compile time error, saying it cannot find the method.  Here is the program.</p>

<pre><code>import java.util.Arrays;

class Test {
   public static void main( String[] args ) {
      int[][] T = {{0,1},{2,1}};
      System.out.println( "\nT[0] is " + Arrays.deepToString( T[0] ) + "." );
      System.out.println( "\nT[1] is " + Arrays.deepToString( T[1] ) + "." );
   }
}
</code></pre>

<p>I'm getting a compile time error, saying that it cannot find the symbol method <code>deepToString( int[] )</code> on lines 6 and 7 of the code.  Am I missing something obvious?  I've imported the correct class, java.util.Arrays, and I am calling the method according to the correct signature.</p>

<p>Please help.</p>
