How do I convert int[] into List in Java?
int[]
List
Of course, I\'m interested in any other answer than doing it in a loop, item by it
The smallest piece of code would be:
public List myWork(int[] array) { return Arrays.asList(ArrayUtils.toObject(array)); }
where ArrayUtils comes from commons-lang :)