A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jun 24, 2002
Jul 29, 2002 21:56:00
Is there anyway to indent output based on the integer value of an variable?
int indentcounter = 3
will indent "hello" three times over and output
[ July 29, 2002: Message edited by: nate saider ]
Joined: Dec 10, 2001
Jul 29, 2002 22:19:00
One strategy you might consider would be use a loop to prefix your output with the appropriate number of space characters. Take a look at
to find which character is the space character (hint: it's number 32).
How To Ask Good Questions
JavaRanch FAQ Wiki
subject: indent whitespace
[Help] Recursive method
Formatting xml using java
implementing a top-down parser
displaying list items in struts
Can somebody give me an example
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014