Java Method getGenericExceptionTypes() MethodThe getGenericExceptionTypes() method of Constructor class returns an array of Type objects representing the exceptions declared to be thrown by this executable object. An array of length 0 is returned if the underlying executable declares no exceptions in its throws clause. SyntaxParameterNo parameter is passed. Returnsan array of Types that represent the exception types thrown by the underlying executable ThrowsGenericSignatureFormatError TypeNotPresentException MalformedParameterizedTypeException Example 1Test it NowOutput: class java.lang.ArrayIndexOutOfBoundsException Example 2Test it NowOutput: [] [class java.io.IOException]
Next TopicJava Method Class
|