java获取类的所有方法





//获取java类的所有方法并打印出来
	public static void sgetMethod() {
		Class c = File.class;
		Method[] m =c.getMethods();
		for (int i = 0; i < m.length; i++) {
			System.out.println(m[i].getName());
		}

	}

猜你喜欢

转载自blog.csdn.net/qq_43314793/article/details/90053764