Java ArrayList to Array listToIntArray(ArrayList list)

Here you can find the source of listToIntArray(ArrayList list)

Description

list To Int Array

License

LGPL

Declaration

public static int[] listToIntArray(ArrayList list) 

Method Source Code


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

import java.util.*;

public class Main {
    public static int[] listToIntArray(ArrayList list) {
        int size = list.size();
        int[] result = new int[size];

        //for (int i = size-1; i >= 0; i--) {
        for (int i = 0; i < size; i++) {

            result[i] = ((Integer) list.get(i)).intValue();
            //////System.out.println("
        }/*www  . j a  v  a2  s .co  m*/
        return result;
    }
}

Related

  1. convertArrayListToIntArray(ArrayList al)
  2. convertIntArrayList2array(ArrayList alInput)
  3. convertStringArrayListToArray(ArrayList al)
  4. doubleArrayList2Array(ArrayList a)
  5. listToArray(ArrayList tempList)
  6. toArray(ArrayList arrayList)
  7. toArray(ArrayList arrlist)
  8. toArray(ArrayList sigs)
  9. toBooleanArray(ArrayList items)