Convert from Queue to ArrayList
arraylist, arrays, casting, java, list
Solution
ArrayList list = new ArrayList(outputQueue);
Problem
I want to change a queue containing numbers and operators into an ArrayList. I am coding in Java. Currently my Queue is defined as follows: ``` Queue outputQueue = new LinkedList(); ``` The queue currently contains the following data: ``` [1, 9, 3, /, 4, 3, -, 2, /, *, +] ``` I wish to do this mainly so i can use RPN to calculate the result of the calculation. Is there a way to do this? Thanks in advance for any help :)