Objectives
- Discuss and examine the advantages and disadvantages of arrays
- Declare arrays
- Initialize arrays
- Pass arrays to methods
- Create Java programs that use arrays
- Use a StringTokenizer
A StringTokenizer lets you break a String up into individual tokens (words). Here is how it works. Please note that StringTokenizer is a convenient way to break up Strings into tokens, but its use in new code is discouraged. The more standard way to break up Strings now would be to use the split method of the String class. The problem with using split is that it uses regular expressions, which we have not covered.