Here you can find the source of arrayToList(Comparable[] array)
@SuppressWarnings("rawtypes") private static List<Comparable> arrayToList(Comparable[] array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { @SuppressWarnings("rawtypes") private static List<Comparable> arrayToList(Comparable[] array) { ArrayList<Comparable> ar = new ArrayList<>(); for (int i = 0; i < array.length; i++) { ar.add(array[i]);// w w w.java2 s. c o m } return ar; } }