Java List from Array arrayToList(char[] charArr)

Here you can find the source of arrayToList(char[] charArr)

Description

array To List

License

Apache License

Declaration

public static List<Character> arrayToList(char[] charArr) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<Character> arrayToList(char[] charArr) {
        List<Character> chList = new ArrayList<>(charArr.length);
        for (char ch : charArr) {
            chList.add(ch);// w ww .  j  a  va  2s.com
        }
        return chList;
    }
}

Related

  1. arrayOf(List objs)
  2. arrayToFixedSizeList(final T[] array)
  3. arrayToInSQL(String column, List list)
  4. arrayToJsonStringArr(List arr)
  5. arrayToList(@SuppressWarnings("unchecked") T... a)
  6. arrayToList(Comparable[] array)
  7. arrayToList(E[] array)
  8. arrayToList(final String... array)
  9. arrayToList(int[] a)

  10. HOME | Copyright © www.java2s.com 2016