Java Class isSynthetic() Method

The isSynthetic() method of java Class class returns true if this class is a synthetic class; returns false otherwise.

Syntax

Parameter

No parameter is passed.

Returns

true if and only if this class is a synthetic class as defined by the Java Language Specification.

Throws

NA

Example 1

Test it Now

Output:

Is Synthetic  ::false

Example 2

Test it Now

Output:

false
false
false
true

Next TopicJava Class




Latest Courses