Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

Word Count app using tokenizer (Java)

Thread view: 
mattaseymour@gmail.com - 28 Dec 2006 22:13 GMT
Hey, I have been set the task to create a program that will read in a
text file (.txt), and will display a list of results showing:

- Number of lines in the file
- Number of words in the file
- Number of characters
- Type of histagram, which shows the number of words with a specific
length

The thing is this program must use the tokeniz (token, tokenizer)
function, and i have no idea how to use this. If anyone has any code
which i could use or if someone would be as kind as to get me code it
would be much appreciated.

Thanks ArcH
Arne Vajhøj - 29 Dec 2006 02:07 GMT
> Hey, I have been set the task to create a program that will read in a
> text file (.txt), and will display a list of results showing:
[quoted text clipped - 9 lines]
> which i could use or if someone would be as kind as to get me code it
> would be much appreciated.

I assume you mean StringTokenizer:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/StringTokenizer.html

Arne
Matt - 30 Dec 2006 21:21 GMT
Yes that is correct should have been more specific. Do you have any
ideas on how i can do this?

ArcH

> mattaseym...@gmail.com wrote:
> > Hey, I have been set the task to create a program that will read in a
[quoted text clipped - 14 lines]
>
> Arne
Martin Gregorie - 31 Dec 2006 01:03 GMT
> Yes that is correct should have been more specific. Do you have any
> ideas on how i can do this?

Don't top post. It annoys people on this list. See further advice below.

> ArcH
>
[quoted text clipped - 13 lines]
>>
>> Arne

Have you actually read Arne's reference? If not, do so.

If your computer doesn't have the Sun J2SE documentation package
installed, go get it from http://www.java.sun.com, install it and use it
to find out about any other classes you may need.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Andrew Thompson - 31 Dec 2006 01:18 GMT
Please refrain from top-posting.

> > mattaseym...@gmail.com wrote:
> > > Hey, I have been set the task to create a program that will read in a
> > > text file (.txt), and will display a list of results showing:
..
> > http://java.sun.com/j2se/1.5.0/docs/api/java/util/StringTokenizer.html

> Yes that is correct should have been more specific. Do you have any
> ideas on how i can do this?

Read the documentation, write some code, come back
here when you strike a compilation or execution problem
(with the code you have).

What?  You weren't expecting us to write it for you, were you?

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.