0

Currently I'm trying to code a document that is able to read the number of sentences in a document as well as the characters, words, and declarations within the document. I'm using mac OSX at the moment and am stuck trying to get the file to output the proper information. Are there special permissions that need to be made within the mac environment?

Update:

I've found a temporary work around for the moment. I discovered the original file has different permission settings and basically copy and pasted the text within the file into a new one entirely. Seems that if permissions are not set properly for the file then it will not be able to read into the file, yet still state the file is there.

TomMonTom
  • 45
  • 7
  • Those double slashes ("//") in the file name - perhaps not harmful, but why? Never heard about this being required anywhere. – laune Jun 20 '14 at 14:23
  • Have you checked that the file isn't size 0 when you put it onto your mac? Could have been an issue when copying it over - Sanity check – Andrew_CS Jun 20 '14 at 14:26
  • This program *never* ran on *any* system. – laune Jun 20 '14 at 14:41

1 Answers1

0

If the next line or token is read into

String token = reader.next();

the code analyzing this string should not use str.

And the initialization of x and y must be moved into the read loop.

Why duplicate the pass through the token? But a space will not be stored in a token, as it acts as a delimiter.

laune
  • 31,114
  • 3
  • 29
  • 42