Java Class getInterfaces() MethodThe getInterfaces() method of java Class class returns the interfaces directly implemented by the class or the interface represented by the current object. SyntaxParameterNo parameter is passed. ReturnsAn array of interfaces. ThrowsDoes not throw an exception. Example 1Test it NowOutput: Class :: java.lang.Thread Classes :: [class java.lang.Thread$State, interface java.lang.Thread$UncaughtExceptionHandler] Interfaces :: [interface java.lang.Runnable] Example 2Test it NowOutput: interface java.io.Serializable interface java.lang.Runnable
Next TopicJava Class
|