When using classes, you can extract varriables from them by using:
ArrayList<CustomClass> obj = new ArrayList<CustomClass>();
obj.add(new CustomClass("parameter 1"));
println(obj.get(0).varriableName);
//or if using an ArrayList
printArray(obj.get(0).arrayListName);
//or if using ArrayList element:
println(obj.get(0).arrayListName.get(<id>));
used in code:
ArrayList<CustomClass> obj = new ArrayList<CustomClass>();
void setup() {
obj.add(new CustomClass("parameter 1"));
println(obj.get(0).varriableName);
//or if using an ArrayList
printArray(obj.get(0).arrayListName);
//or if using ArrayList element:
println(obj.get(0).arrayListName.get(2));
}
class CustomClass {
float varriableName = 123;
ArrayList<Float> arrayListName = new ArrayList<Float>();
CustomClass(String randomTxt) {
if (randomTxt.equals("hax")) println("Hi");
for (int i = 0; i < randomTxt.length(); i++) arrayListName.add(random(255));
}
}