Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to spilt the string with comma in jaav

String str = "dog, cat, bear, elephant, ..., giraffe";
List<String> elephantList = Arrays.asList(str.split(","));
//If you want to additionally get rid of whitespaces around items:
String[] elephantList = str.split("s*,s*");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spilt #string #comma #jaav
ADD COMMENT
Topic
Name
4+6 =