 <p>Mentioned in Oracles <a href="https://docs.oracle.com/javase/tutorial/reflect/special/arrayComponents.html" rel="nofollow">Tutorial</a> this is easily achievable with <code>array.getClass().getComponentType()</code>. This returns the class of the instances in the array. </p> <p>Afterwards you can check it against the primitive class located inside each wrapper object. For example:</p> <pre><code>if (array.getClass().getComponentType().equals(Boolean.TYPE)) { boolean[] booleanArray = (boolean[]) array; } </code></pre>