The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.util  [50 examples]

e332. Breaking a String into Words

    String aString = "word1 word2 word3";
    StringTokenizer parser = new StringTokenizer(aString);
    while (parser.hasMoreTokens()) {
        processWord(parser.nextToken());
    }

 Related Examples
e331. Generating a Random Number
e333. Creating a Custom Event
e334. Implementing a Simple Event Notifier
e335. Listing All Available Locales
e336. Setting the Default Locale
e337. Associating a Value with an Object

See also: Arrays    Bits    Collections    Dates    Hash Tables    Lists    Property Files    Sets    Sorted Collections    Time    Timers   


© 2002 Addison-Wesley.