Ask your own question, for FREE!
Computer Science 7 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
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
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!