小弟初学JAVA,大虾们帮帮忙啊

解决方案 »

  1.   

    这个只要查查Class类的具体方法就行了
      

  2.   

    Class c1 = Set.class ;
            Method[] m1 = c1.getDeclaredMethods() ;
            for(int i=0; i<m1.length; i++)
            {
                System.out.println(m1[i].getName());
            }
    Class c2 = HashMap.class;
    ...
    ...
    ..
      

  3.   

    Method[] methods = java.util.Set.class.getMethods();for(int i = 0;i<methods.length;i++) {
         System.out.println(methods[i].getName() );
    }HashMap 照着写!!