title: What does "%1$#" mean when used in String.format (Java)?
body: <p>Language is Java. What does the <code>%1$#</code> mean in...</p>
  
  <pre><code>static String padright (String str, int num) {
     return String.format("%1$#" + num + "str", str);
  }
  </code></pre>
  
  <p>In the Java API, <code>String.format()</code> is used in this way:</p>
  
  <pre><code>public static String format(String format, Object... args)
  </code></pre>
  
  <p>So I think <code>%1$#</code> is a format specifier.</p>
  
  <p><code>%[flags][width][.precision][argsize]typechar</code> is the template.</p>
  
  <ul>
  <li>1 is a flag?  </li>
  <li>$ is the width?  </li>
  <li># is the precision?  </li>
  <li>num is the argsize?  </li>
  <li>"str" is the typechar?  </li>
  </ul>
  
  <p>Is that right?</p>