Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Write Strings Using String Format  RSS feed

 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • 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
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • 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
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • 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: 3268
82
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!