Check http://docs.oracle.com/javase/7/docs/api/java/util/List.html#toArray(T[])