how to remove the words such as the, is , are, and or from text file

my problem is

i want to make an application to do that

eceives a test file from the user, this file contains a list of words , the program must do the following

1- Remove the words such as the, is , are, and or

2- Count the number of occurrences of each word

3- Display a two column message, the first column contains a word and the second column contains the number of repetitions of this word

i make number 2 and 3 how can i do number 1

[483 byte] By [electronic_2010a] at [2007-11-26 18:22:33]
# 1
1) Read in the file and store it into some Collection.2) Loop through the Collection and remove the words.3) Rewrite the Collection to the Text file.
CaptainMorgan08a at 2007-7-9 5:56:28 > top of Java-index,Java Essentials,Java Programming...
# 2
I would accumulate word frequency in a Map<String, Integer> -- is that what you are doing? But before processing a word I would check to see if it is contained in a Set<String> of common words. In which case further processing of the word is not required.
DrLaszloJamfa at 2007-7-9 5:56:28 > top of Java-index,Java Essentials,Java Programming...