utilizza la classe StringTokenizer:
è uno stralcio della documentazione.The following is one example of the use of the tokenizer. The code:
StringTokenizer st = new StringTokenizer("this is a test");
while (st.hasMoreTokens()) {
println(st.nextToken());
}
prints the following output:
this
is
a
test
ovviamente puoi anche definire tu il delimitatore![]()