Formatting Console output

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2008
Posts: 10
Reputation: Karkalash is an unknown quantity at this point 
Solved Threads: 0
Karkalash Karkalash is offline Offline
Newbie Poster

Formatting Console output

 
0
  #1
Apr 20th, 2008
Hi all:

I'm a newbie at Java and having fun

So I'm doing a pattern program, so far so good, but I wanted to ask if there is any console specifier for spaces only and not width between integers. I'm using only integers so I thought I should use %5d inside a printf statement. But alas, it just creates big spaces between my numbers. What I need is a specifier that does not mess with the space between my numbers and makes my whole number line move to the right. Is such thing existent? Or is there a way to format everything to the right, like one would do in a word document.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC