getMethods(), java

2019-07-16 12:51发布

问题:

In java, the method 'Class.getMethods()' returns an array of all the methods in the reciever class and also its superclasses. Is there such a method like Class.getMethods() which only give us the class's methods, without those which are inhereted from its superclasses?

回答1:

getDeclaredMethods()