Here you can find the source of asList(int[] arr)
Parameter | Description |
---|---|
arr | a parameter |
public static List<Integer> asList(int[] arr)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { /**//from ww w . j ava 2s .c o m * * @param arr * @return */ public static List<Integer> asList(int[] arr) { Integer[] arrObj = new Integer[arr.length]; for (int i = 0; i < arr.length; i++) { arrObj[i] = arr[i]; } return Arrays.asList(arrObj); } }