How to store random coordinates?

You need to make a class

class MyPoint {
   PVector pvPoint; 
   String namePoint; 
}

Then the Arraylist ist of type MyPoint
ArrayList<MyPoint > list = new ....

Then it’s e.g. println(list.get(3).namePoint);

see website | tutorials | objects to learn more

2 Likes