How to split a string by spacing in android code example Example: space seperator in string in java String[] splitted = "peter,james,thomas".split(",");