Organizational Research By

Surprising Reserch Topic

how to convert comma separated string to arraylist


how to convert comma separated string to arraylist  using -'java,string,collections,split'

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 that?

String commaSeparated = "item1 , item2 , item3";
ArrayList<String> items = //method that converts above string into list??

    

asked Sep 30, 2015 by shegokar.anjeet
0 votes
10 views



Related Hot Questions

7 Answers

0 votes
NULL
answered Sep 30, 2015 by vimaldas2005
0 votes
NULL
answered Sep 30, 2015 by loknath.ganji
0 votes
NULL
answered Sep 30, 2015 by mca.agarwal
0 votes
NULL
answered Sep 30, 2015 by yashwantpinge
0 votes
NULL
answered Sep 30, 2015 by ashish singh
0 votes
NULL
answered Sep 30, 2015 by rajeshujade
0 votes
NULL
answered Sep 30, 2015 by param.oncemore

...