S
Shawn
Hi,
I want to print out two variable values in one line in specified location.
Say, num = 3.14, str = "hello"
I want to print out num at the location between 10 and 15(right
justified) and str at the location between 20 and 30(left justified).
I dont' want to hard-code the spaces, because the spaces in between
depends on the value of num and str and their value can be different
each time.
I don't know Java 5.0 printf can do such a job. I have read its
tutorial, but I cannot find out how to set the location without hard-coding.
Thank you very much.
I want to print out two variable values in one line in specified location.
Say, num = 3.14, str = "hello"
I want to print out num at the location between 10 and 15(right
justified) and str at the location between 20 and 30(left justified).
I dont' want to hard-code the spaces, because the spaces in between
depends on the value of num and str and their value can be different
each time.
I don't know Java 5.0 printf can do such a job. I have read its
tutorial, but I cannot find out how to set the location without hard-coding.
Thank you very much.