Second, I'm a little suspect of the logic. Think about a "found" flag to tell when you found the word in the "bad word" list.
See if those two fixes get you going. Post what you wind up with and we'll talk about some further improvements.
Originally posted by Stan James:
First, you'll need to use equals() to compare two strings instead of ==. == is true if the two strings are the very same String object, while equals() is true for two String objects that happen to have the same value.
Although it will work in this case, because the array is populated with String literals.