Here you can find the source of toIntArray(List extends Number> ints)
public static int[] toIntArray(List<? extends Number> ints)
//package com.java2s; /**/*from ww w. j a v a2s .c o m*/ * Copyright (c) 2011 Michael Kutschke. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies * this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: * Michael Kutschke - initial API and implementation. */ import java.util.List; public class Main { public static int[] toIntArray(List<? extends Number> ints) { int[] result = new int[ints.size()]; int i = 0; for (Number j : ints) { result[i] = j.intValue(); i++; } return result; } }