question: public static int [ ] toArray ( List < Integer > list ) { if ( list == null ) { return null ; } int length = list . size ( ) ; int [ ] intArray = new int [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { intArray [ i ] = list . get ( i ) ; } return intArray ; }
target:  Converts a list of integers to a primitive array.