how to split up a string seperated by spaces java code example Example: space seperator in string in java String[] splitted = "peter,james,thomas".split(",");