stacktome stacktome - 4 years ago 153
Java Question

Convert Iterator to Array

I need to return a string array. I use Guava to split the string. please see the code below

Iterable<String> arrayOfValues = Splitter.on(";").split(myString);


it return the Iterator List. but i need a
String[]
. Is there are any way to give
Iterator< Element >
and convert that to
Array[]
. Many Thanks

Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download