Java Class isSynthetic() Method

21 Mar 2025 | 1 min read

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

Output:

 Is Synthetic ::false 

Example 2

Output:

 false false false true 
 
Next TopicJava Class