java TokenTester "12 8 5 32" 12 8 5 32
Here is the program again, but this time with the delimiters specified in the constructor. The delimiters are now space, equals, plus, and minus.
import java.util.* ; public class TokenTester { public static void main ( String[] args ) { StringTokenizer tok; if ( args.length > 0 ) { tok = new StringTokenizer( args[0], " =+-" ); // note the space before = while ( tok.hasMoreTokens() ) System.out.println( tok.nextToken() ); } } }