I am creating a program that simulates the functioning of a metro network.
I have reached a point where I have to create the lines from a graph where I have all the stops and their respective connections. I have considered the option of creating a linked multilist but the task is very heavy for the utility that I want to give it.
My question is: Can we create an ArrayList, that it is Arraylist type and that it contains stop objects (The explanation of the stopped object is not relevant for my problem, I store the data and characteristics of each stop). Come on, what I want to do would be something like this:
ArrayList <ArrayList><Parada> lineasMetro = new ArrayList<>();
But it is not possible to do it this way.