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.
Type: Posts; User: andbin
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.
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) {
...