Re: Print Stream Manipulation:



Hi,

Lea0x.Diz@xxxxxxxxx wrote:
Is there any way to specify variable as the width(right-alignment),
say:

<code>
String str = "some string here";
int var = str.length()*2;
System.out.printf("%vars", str);
</code>

I know the code is dead wrong, but just to illustrate my question.
Anybody?

Perhaps the class java\text\MessageFormat might be useful for you?

Ciao,
Ingo

.



Relevant Pages