Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Write Strings Using String Format

 
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends I am writing String to A file like this as I got it from http://stackoverflow.com/questions/15949737/write-string-to-a-specific-position-in-file/15949990?noredirect=1#15949990:

I however need to write Upto four Strings in this format and I do not know How to go About this



What Would I need to do if I wanted to write three Strings or More like



Please Help
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stanley Mungai wrote:Hello friends I am writing String to A file like this as I got it from http://stackoverflow.com/questions/15949737/write-string-to-a-specific-position-in-file/15949990?noredirect=1#15949990:

I however need to write Upto four Strings in this format and I do not know How to go About this



What Would I need to do if I wanted to write three Strings or More like



Please Help


Ok so you got this code from somewhere else, do you understand how it works? and what have you tried to do to solve your current problem?
 
Stanley Mungai
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony, I am the One who asked the Question even at stackoverflow,, I Understand How it works and What I do not Understand is the format pattern.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, have you looked at the documentation for format patterns: ie http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax
 
It's feeding time! Give me the food you were going to give to this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic