how to split string to new string with space char code example Example: space seperator in string in java String[] splitted = "peter,james,thomas".split(",");