java add items to arraylist at random time intervals
问题 trying to add an item at random time intervals. I was thinking I need to start when i is equal to arriveTime, once that is met I need to create a new random arrival and add i (otherwise it will not happen again as i is already past arrival. So I add another if, once that is met create new arrival time and add i again. pseudocode seems to make sense, code not so much, any help is appreciated. ArrayList<Integer> q = new ArrayList<Integer>(); Random r = new Random(); int arrivals = 0; for (int i