Print Stream Manipulation:



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?

.