Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

text file

 
Am Aql
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am having problem in fixing my course work.here is the question:
i am to design,implement and demonstrate a command-line application
that count the number of words,sentences,paragraphs,digits in a piece
of input text.pls do assist me,thanks.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

We'll gladly try to get you going. What do you have so far? Are you familiar with Java file I/O in general? If not, here's an example of how to read a file line by line. Once you have read the text, how would you count it?

I'll move this over to the I/O and Streams forum where file I/O questions are handled.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!