In this section you will come to know that how you can retrieve Component Type of an array's element.
Getting Component type
In this section you will come to know that how you can retrieve Component Type of an array's element. The component type of an Array is the type of array's element. For example if we have an integer type array then its component type will also be integer.Here is the example code of ComponentType class :
ComponentType.java
import java.lang.reflect.*;
|
To run this example create and save ComponentType.java and compile it. After compilation execute ComponentType.class file.
Output: