Java Class isAnonymousClass() Method

The isAnonymousClass() method of java Class class returns true if the underlying class is an anonymous class.

Syntax

Parameter

NA

Returns

true if this class Is an anonymous class.

Throws

NA

Example 1

Test it Now

Output:

The Class Name = ClassisAnonymousClassExample1
Is this AnonymousClass = false

Example 2

Test it Now

Output:

true

Next TopicJava Class




Latest Courses