Hello. I have been lurking around here getting tips and advice for quite some time: it's greatly appreciated. I am, however, stumped, and need some help using Stringtokenizer. I will comment parts of code to keep it confidential, but what is posted should explain:
Have you been told to use StringTokenizer? It is described here as legacy code and users are "discouraged" from using it in new code.
You can get individual lines from a text file by various techniques; I think the Scanner#nextLine() method might be the simplest. Then you can use the java.lang.String#split method to separate it into words.
You can do all sorts of things with those words, even putting them into a java.util.Set<String> which has a contains method.
Joined: Mar 25, 2009
I am not required to do anything; this is a personal project I'm working on. The problem I had was finding a way to do this. I am currently taking a JAVA class and they are fans of using the Princeton Standard Libraries to try to "simplify" things...meanwhile, it's not convenient when trying to do slightly more difficult things.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com