java - How to convert an int[] array to a List? -
i expected code display true
:
int[] array = {1, 2}; system.out.println(arrays.aslist(array).contains(1));
the arrays.aslist(array)
result in singleton list of int[]
.
it works expect if change int[]
integer[]
. don't know if helps though.
Comments
Post a Comment