import java.io.*;
import java.util.*;

//
// This provides a simple example of using a stringtokenizer. 

public class StrTokens {
   public static void main(String[] args) throws IOException {
      StringTokenizer parser = new StringTokenizer("hello~there~10~times", "~");
      
      // While the next token is not the end of the file read it in
      // and determine if it is a string or a number.

      while (parser.hasMoreTokens()){
        System.out.println(parser.nextToken());
      }
    }
}
