title: Determining the type of objects in a collection or array
body: <p>Suppose I have an array int[][] or an array char[][] or an ArrayList. Is there a way in java to know the base class type of the array. For Example:</p>
  
  <pre><code>int[][] gives output as int.
  char[][] gives output as char.
  ArrayList&lt;Integer&gt; gives output Integer.
  ArrayList&lt;Point&gt; gives Point. (It should also work for a custom type)
  </code></pre>
  
  <p>Can this be done in Java?</p>