String stringToSplit = This is the string to split;
String[] split = stringToSplit.split("character to split at");
In this case, split[0]
would result as ' This ', split[1]
would be ' is ', split[2]
would be ' the ', split[3]
' string ' split[4]
' to ' split[5]
' split '.
At this point you can do
var0 = split[0];
var1 = split[1];
var2 = split[2];
Where var0
would equal "This"
And so on...
Hope this helps.