| | |
StringTokenizer
Thread Solved |
•
•
Join Date: Jan 2004
Posts: 2
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jan 2004
Posts: 2
Reputation:
Solved Threads: 0
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
![]() |
Similar Threads
- array from StringTokenizer (Java)
- help on using StringTokenizer to read and compute multiple lines from text (Java)
- StringTokenizer: To searh and replace a word. (Java)
- StringTokenizer (Java)
- StringTokenizer??? NEED HELP PLEASE!!! (Java)
Other Threads in the Java Forum
- Previous Thread: DLL equivalent to xerces.jar
- Next Thread: Java with String Tokenizer
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card chat class client code collision component crashcourse css csv database eclipse ee error fractal free game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linux list loan machine map method methods migrate mobile netbeans newbie objects oriented output panel phone physics problem program programming project projects radio recursion replaydirector reporting scanner se server service set sms socket software sort sql string swing test textfield threads transfer tree trolltech ubuntu utility windows





