Conditions: do not modifiy the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 version.
Is there a simpler way than:
Almost of answers suggest to use an ArrayList.
List newList = new LinkedList<>(listOne);
newList.addAll(listTwo);
Prefer to use a LinkedList for efficient add operations.
ArrayList add is O(1) amortized, but O(n) worst-case since the array must be resized and copied. While LinkedList add is always constant O(1).
more infos https://stackoverflow.com/a/322742/311420