• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

tokenizer

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have this file names.txt that holds names only separated by commas. I am trying to learn how to get the file use a stringtokenizer to parse it out and write to a file which doesnt exist yet called copied.txt I am able to get it to work and ouput to screen using system.out.println but i want o write it to a file. please help . here is code below i am working on thanks


Carl - I added the UBB Code Tags to make this easier to read.
[This message has been edited by Carl Trusiak (edited April 22, 2001).]
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are extremely close. While there are several ways to do this, using a PrintWriter will meet your needs with the least changes.
Change the top to

And at the bottom


------------------
Hope This Helps
Carl Trusiak, SCJP2
 
Ramesh Phankir
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks carl, have a great day
 
Forget Steve. Look at this tiny ad:
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF
htttp://www.e-iceblue.com/free-apis.html
    Bookmark Topic Watch Topic
  • New Topic