Java Class getComponentType() MethodThe getComponentType() method of java Class returns the class representing the component type of an array. Otherwise this method return null. SyntaxParameterNA ReturnsClass representing the component type. ThrowsThis does not throw an exception. Example 1Test it NowOutput: The componentType = java.lang.String Example 2Test it NowOutput: int class java.lang.String class java.lang.Void null Next TopicJava Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India