Java Class isInterface() Method

The isInterface() method of java Class class checks if the specified class object represents interface or not. If not then return false.

Syntax

Parameter

NA

Returns

true if this object represents an interface; false otherwise.

Throws

NA

Example 1

Test it Now

Output:

It is an interface ? : false

Example 2

Test it Now

Output:

true

Next TopicJava Class




Latest Courses