Java Class getMethod() MethodLast Updated : 17 Mar 2025 The getGenericSuperClass() method of java Class class returns a method object representing the specified public member method of the class or interface represented by this Class object. The name parameter is passed as a string. SyntaxParametername - the name of the method parameterTypes - list of parameters ReturnsThe Method object. ThrowsNoSuchMethodException , NullPointerException , SecurityException Example 1Output: method = public java.lang.Integer ClassgetMethodExample1.showMethod() method = public void ClassgetMethodExample1.showLongMethod(java.lang.Long) Example 2Output: public int ClassgetMethodExample2.IntCalc(int) public void ClassgetMethodExample2.Work() public static void ClassgetMethodExample2.StaticMethod(java.lang.String) public void ClassgetMethodExample2.Work() Next TopicJava Class |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India