• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Text File Sorting and counting words from the file

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
I am in a mistry with the following problem.
Please help me to solve this.
Problem is:
A text file contains text written in English.All the words appear in lower case characters and the only punctuation used is commas,full stops and spaces. As an output, your java program is expected to list all the words in alphabetical order followed by their frequency of use as shown below. You are required to use an output dialog box and JTextArea to display your output as shown below:
look 52
may 11
module 3
workplace 7
It is assumed that each line will contain an integral number of words and the number of words in the text does not exceed 12000.
I will appreciate any kind of co-operation.
Umme Salma
:roll:
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Try the code specified in the URL...
http://www.freejavahelp.com/forums/sourcecode/messages/10231.shtml

Hope it Helps,

Mahesh
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. This sounds like homework to me. So please ask specific questions but don't just ask how to do it.
2. This has nothing to do with servlets so I am moving this to the beginner forum.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic