I am writing a program where I want to split a string separated by comma. My problem is a user can pass or input the string to the program like this:
Hello,,hey,123
So, is there a way that I can add a space between the hello and hey before I append it to a arraylist. Also my delimiter is ignoring the double ,, and just going to the next word why is that ?
1 Answer