In this case, the method asListreturns List<int[]>what you are not expecting.
The reason is that you cannot have List<int>. To achieve what you want, create an array Integer- Integer[].
Apache commons-lang has ArrayUtilsfor this:
if(Arrays.asList(ArrayUtils.toObject(VOWEL_POS)).contains(0))
or make an array first Integer[]so that no conversion is required
Bozho source
share