• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

writing to file - HELP!!!

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write some results from my program to a file - I think this should be fairly straightforward especially since there is quite a lot of information to do that. My problem is with respect to the way I need the results to be written to the file. For instance, the results I want displaying are in an array - and for each line of the file I want all the rows for a particular column to be output in the following way:
{some numbers(ints) separated by a comma indicating the next element for that column(ie, the next row)}
I want this to be done for every column.
My problem is that I don't know how to do this - if it was a matter of taking some data from a textfield the matter would be fairly straight forward.
Does anyone have any suggestions???
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you'd just use a couple of "for" loops, yes?

Be sure to use a BufferedWriter, or all these little writes will be slow.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic