StringTokenizer

Thread Solved

Join Date: Jan 2004
Posts: 2
Reputation: Turbo is an unknown quantity at this point 
Solved Threads: 0
Turbo Turbo is offline Offline
Newbie Poster

StringTokenizer

 
0
  #1
Jan 17th, 2004
HI I have written a program that reads text from the input file and writes the text to the out put file. Im using the StringTokenizer to count the number of words in the input text file. The problem is that it reads only the first line but it does not read the second line of text. How do I instruct the StringTokenizer class to jump to the second line?

I have tried the following:

buf = dinn.readLine();
reader = new StringTokenizer(buf,"\n");

As you can see I added a delimiter \n but no success. I have attached the whole program that I wrote, but please do not distribute. Thanks
Attached Files
File Type: zip a - Read File - program.zip (20.1 KB, 42 views)
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 2
Reputation: Turbo is an unknown quantity at this point 
Solved Threads: 0
Turbo Turbo is offline Offline
Newbie Poster

Re: StringTokenizer

 
0
  #2
Jan 17th, 2004
ACTUALLY I HAVE FIGURED IT OUT... SO NO MORE HELP IS NEEDED.. If anyone wants to see it how I did it then take a look at the latest program... I had to make some modifications so no longer the user is prompted is he/she wants to save the results to the file... it is done automatically... in the second version of this program I will make that addition. Thanks
Attached Files
File Type: zip a - Read File - programUpdate.zip (13.9 KB, 73 views)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC