ArrayList...? - Making words in a file elements in an array

Hi,

I'm trying to read in a text file and make the words in the file elements in an array. As ArrayList is an array that grows this seems like a good step.

Opening the file isn't a problem, Adding/Removing configuring the ArrayList isn't a problem but I don't understand how to seperate each word from the text file and push them into the ArrayList.

I've had a look about and the common way seems to be to start by chopping the text file up into lines (hunting for /n), then words (hunting for " " || "," etc, then feed them into the array.

Anyone got any better suggestions?

[612 byte] By [wuciwuga] at [2007-11-27 3:53:50]
# 1
Use java.util.Scanner and regular expressions.Or use java.io.StreamTokenizer.Or use java.io.BufferedReader and java.util.StringTokenizer.Or use java.io.BufferedReader and java.lang.String.split.
paulcwa at 2007-7-12 8:57:55 > top of Java-index,Java Essentials,Java Programming...