This is not a duplicate question because I'm specifically asking to convert an ARRAY of STRINGS to a LIST of INTEGERS. In other words, converting both different types of lists AND different object types at the same time.
import java.util.*;
import java.util.stream.Collectors;
String[] allAnswers = {"2", "4", "1"}
int[] allAnswersInts = Arrays.stream(allAnswers).mapToInt(Integer::parseInt).toArray();
List<Integer> allAnswerList = Arrays.stream(allAnswersInts).boxed().collect(Collectors.toList());
Is there a faster or more practical way to do this?