Search:

Type: Posts; User: andbin

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    1,049

    Re: Text Formatting/left, right justify

    Yes, from java.util.Formatter's javadoc:
    The optional width is a non-negative decimal integer indicating the minimum number of characters to be written to the output.
  2. Replies
    6
    Views
    1,049

    Re: Text Formatting/left, right justify

    If you use just %-1s or %1s the width specification ('1') is too short to see the effect of left/right alignment.
    Try:


    public class LRAlignment {
    public static void main(String[] args) {
    ...
Results 1 to 2 of 2