In Java 8:
List<String> newList = Stream.concat(listOne.stream(), listTwo.stream())
.collect(Collectors.toList());
Java 16+:
List<String> newList = Stream.concat(listOne.stream(), listTwo.stream()).toList();
In Java 8:
List<String> newList = Stream.concat(listOne.stream(), listTwo.stream())
.collect(Collectors.toList());
Java 16+:
List<String> newList = Stream.concat(listOne.stream(), listTwo.stream()).toList();