Multiple classes in an (undefined) ArrayList?

this seems to work:


// imports ----

import java.lang.reflect.Field;
import java.util.Collections;

....
...
....


  println("---------------------------------------------------------");

  println("\n*****  METHODS  *****");
  for (java.lang.reflect.Method c : getClass().getDeclaredMethods()) {
    //
    println("-----------------------------");

    println(c.getClass());

    println((String) c.getName());
  }//for

cf. Object (Java Platform SE 7 )
cf. Class (Java Platform SE 8 )
cf. Method (Java Platform SE 8 )

1 Like