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
List commaseperated = new ArrayList(); String mylist = "item1 , item2 , item3"; mylist = Arrays.asList(myStr.trim().split(" , ")); // enter code here