We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I want to know how to call functions for objects in array lists. I have tried several methods but can't figure it out. My code is long and has a lot of unrelated parts so I didn't include it here, but if you think it would be helpful to see just ask.
Answers
Use List::get() method in order to access the indexed stored object 1st:
https://Docs.Oracle.com/javase/8/docs/api/java/util/List.html#get-int-
List::get() should just work if you had declared the generics datatype of the container:
https://Processing.org/reference/ArrayList.html
Now that you've got the desired indexed element object outta the container, you're free to use the dot
.
operator to access any members from the object:https://Processing.org/reference/dot.html