# Multiple classes in an (undefined) ArrayList?

**URL:** <https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291>\
**Category:** Beginners\
**Created:** [February 11, 2019, 7:14pm UTC](https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291 "2019-02-11T19:14:45Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 4, 2023, 10:59am UTC](https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291/15 "2023-04-04T10:59:21Z")

</div>

this seems to work:

```auto

// 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 )](https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html)  
cf. [Class (Java Platform SE 8 )](https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html)  
cf. [Method (Java Platform SE 8 )](https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html)

---

_[View the full topic](https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291)._
