Welcome to the JavaRanch, cool sandy. We are a friendly bunch here, so we ask that you use your real name. As our
Naming Policy states, accounts with obviously fictitious names will be closed.
You can change your displayed name
here.
Thanks.
The questions you are asking are pretty basic. Since there's a chance you may be working on homework, I'm going to steer you in the right direction, but leave the work up to you.
For your first question, in order to count the number of words in a file, first you have to read the file. The Java Tutorial has a chapter on
Input/Output. Give it a read.
For your second question, the file system in Java is represented by the
java.io.File object.
Give your tasks a try and we'll be here if you have any more questions.
BTW, it's "Heaven doesn't
want me. Hell's afraid I'll take over"