Integer[] array = {1,2,3,4,5,6}; Arrays.asList(array).indexOf(4);. Note that this solution is threadsafe because it creates a new object of type List.
確定! 回上一頁