could you be a little more clear about the question? what are the substrings you are trying to extract? is ',' a token if so you could use StringTokenizer. if the substrings are going to be a fixed length then you could create a inputreader object and read specific characters. I think it all comes down to what you define as substring
I think the best way to do this is with the method String.split().
This method allows you to split a String in different pieces, using a delimiter that determines where the String is split.
These pieces, then, will be put in an array.