seperate a string from space using java code example
Example 1: space seperator in string in java
String[] splitted = "peter,james,thomas".split(",");
Example 2: how to strip spaces in java using split with other delimiters
String[] splitted = input. trim(). split("\\s*,\\s*");