Search:

Type: Posts; User: pbrockway2

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    1,760

    [SOLVED] Re: Setting field width System.out.printf

    You're welcome.
  2. Replies
    3
    Views
    1,760

    [SOLVED] Re: Setting field width System.out.printf

    You could create the format string as, itself, a formatted string!



    int x = 42;
    String fmt = String.format("%%%ds\tPlayer Points\tComputer Points\t Winner\n", x);
    System.out.printf(fmt,...
Results 1 to 2 of 2