The string tokenizer class allows an application to break a string into tokens.
StringTokenizer(String str) StringTokenizer(String str, String delim) StringTokenizer(String str, String delim, boolean returnDelims)
import java.util.StringTokenizer; public class Test { public static void main(String[] args) { StringTokenizer st = new StringTokenizer("a|b|c", "|"); while(st.hasMoreTokens()){ System.out.println(st.nextToken()); } } } }
a b c
# join #array #explode #split #stringtokenizer #tokenizer