Retrieve methods of current class and super classes

Retrieve methods of current class and super classes


It is advised to read the notes on Java Reflection API before attempting the programs.

Example on Retrieve methods of class

getMethods() returns only public constructors of current class and all super classes.

getDeclaredMethods() returns all constructors of any specifier of current class

One thought on “Retrieve methods of current class and super classes

  1. v.s.

    sir, below of the above program you have mistakenly written wrong information about “getMethods()” and “getDeclaredMethods()”

Leave a Reply

Your email address will not be published. Required fields are marked *