Javatpoint Logo
Javatpoint Logo

Java Method getGenericExceptionTypes() Method

The 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.

Syntax

Parameter

No parameter is passed.

Returns

an array of Types that represent the exception types thrown by the underlying executable

Throws

GenericSignatureFormatError

TypeNotPresentException

MalformedParameterizedTypeException

Example 1

Test it Now

Output:

class java.lang.ArrayIndexOutOfBoundsException

Example 2

Test it Now

Output:

[]
[class java.io.IOException]
Next TopicJava Method Class





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA