Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to convert a collection to array in java

List<String> list = new ArrayList<String>(); // Original list
String[] arr = list.toArray(new String[list.size()]);  // toArray function with array to be populated by this list as an argument.
 
PREVIOUS NEXT
Tagged: #convert #collection #array #java
ADD COMMENT
Topic
Name
9+2 =