I'm new to java and would like to know how I could convert the following code from using a HashMap called floorsMap to using an ArrayList called floorsArray instead.
void randomizeQueues(String flag) {
double num = (flag.equals("enforce")) ? 0.99 : Math.random();
if (num > 0.5)
floorsMap.values().forEach(Floor::randomizeDestinations);
}