1.
Method[] methods = Yuitest.class.getMethods();
for (Method method:methods){
System.out.println( method.getName());
}
2.
Yuitest yuitest =new Yuitest();
Method[] methods = yuitest.getClass().getMethods();
for (Method method:methods){
System.out.println( method.getName());
}
3.
原文:https://www.cnblogs.com/shanshen/p/9821216.html