Java Array to Collection arrayToCollection(Object[] objs)

Here you can find the source of arrayToCollection(Object[] objs)

Description

array To Collection

License

Open Source License

Declaration

@SuppressWarnings({ "rawtypes", "unchecked" })
public static List arrayToCollection(Object[] objs) 

Method Source Code


//package com.java2s;
import java.util.ArrayList;
import java.util.Arrays;

import java.util.List;

public class Main {

    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static List arrayToCollection(Object[] objs) {

        return new ArrayList(Arrays.asList(objs));

    }//from   w  ww  . j a va2  s.co m
}

Related

  1. arrayToCollection(Collection collection, T[] elements)
  2. arrayToCollection(E[] array, C collection)
  3. arrayToCollection(String[] values)