Java Method getReturnType() MethodThe getReturnType() method of Method class returns a Class object that represents the formal return type of the method represented by this Method object. SyntaxParameterNo parameter is passed. ReturnsThe return type for the method this object represents ThrowsDoes not throw an exception. Example 1Test it NowOutput: Return Type:: void Example 2Test it NowOutput: Method Return Type::void
Next TopicJava Method Class
|