Java examples for Language Basics:StringTokenizer
StringTokenizer return tokens as Objects
import java.util.StringTokenizer; public class Main { public static void main(String[] args) { StringTokenizer st = new StringTokenizer("Java StringTokenizer Example"); while(st.hasMoreElements()){ System.out.println(st.nextElement()); } /*from w ww . ja v a 2 s . c om*/ } }