001package edu.pdx.cs410J.core; 002 003import java.util.*; 004 005/** 006 * This classes parses strings from the command line using a 007 * <code>StringTokenizer</code>. 008 */ 009public class ParseString { 010 011 /** 012 * The second <code>String</code> from the command line contains the 013 * parsing delimiters. 014 */ 015 public static void main(String[] args) { 016 String string = args[0]; 017 String delimit = args[1]; 018 StringTokenizer st; 019 st = new StringTokenizer(string, delimit); 020 021 while (st.hasMoreTokens()) { 022 String token = st.nextToken(); 023 System.out.println("Token: " + token); 024 } 025 } 026}