Ask your own question, for FREE!
Computer Science 53 Online
OpenStudy (anonymous):

My question is I have a txt file with several lines of info which include first name lastname hourly rate (since its a payroll program.) they are comma seperated. So i have use JoptionPane and read individual line and ask user how many hours first person worked. After input it goes thru the whole file (loop) asking how many hours each person worked. so far i have done that , i used strinktokenizer to read file line and comma delimited. but i cannot display it

OpenStudy (anonymous):

My current code is. while((rec=fileIn.readLine())!=null) { tok = new StringTokenizer(rec, ", ")

OpenStudy (e.mccormick):

That is the code with some gaps... big ones. Hopw about changing: ``` tok = new StringTokenizer(rec, ", ") ``` to ``` StringTokenizer tok = new StringTokenizer(rec, ", ") ``` And here are a few sites with examples of use: http://www.mkyong.com/java/java-stringtokenizer-example/ http://www.java-tips.org/java-se-tips/java.util/how-to-use-stringtokenizer.html

OpenStudy (anonymous):

thanks. I solved the program.!!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
MakaylaChuck23: Help wats this
1 hour ago 1 Reply 0 Medals
MakaylaChuck23: uh oh
1 hour ago 1 Reply 0 Medals
Treeko: Pics I took w my friend !
3 hours ago 6 Replies 1 Medal
Aliciaa: Is anyone elses QC going wack? Mine keeps freezing and stuff
1 hour ago 26 Replies 0 Medals
autumnp: does anyone have bandlab?
4 hours ago 4 Replies 0 Medals
Jeromeccv: Art for @vanessad123
1 hour ago 49 Replies 4 Medals
ohhhhhhhhhhhhhh: how do i slim my waist fast
4 hours ago 4 Replies 1 Medal
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!