Is there any built-in method in Java which allows us to convert comma separated String to some container (e.g array, List or Vector)? Or do I need to write custom code for t
Here is another one for converting CSV to ArrayList:
String str="string,with,comma"; ArrayList aList= new ArrayList(Arrays.asList(str.split(","))); for(int i=0;i"+aList.get(i)); }
Prints you
-->string -->with -->comma