Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

I need help with question asap

Tokenization) - Tokenization is the process of breaking a stream of text up into words, phrases, symbols, or other meaningful elements called tokens. Write a program that reads a text file passes as an argument to the main method from the command line and extracts all the unique words from the file and prints them in the console one per line. You should discard any other characters in the file: white spaces, digits and punctuation characters. how should this be implemented?

1 Answer

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Check out StringTokenizer. Use the args in the main method to get the file name. Reading files is pretty straight forward, let me know if you hit a roadblock.