title: How a byte array is used get a formatted String from String.format ? And what does formatted string mean in particular?
body: <pre><code>byte mac[] = ni.getHardwareAddress();
  StringBuilder sb = new StringBuilder();
  
  sb.append(String.format("%02X%s", mac[i], (i &lt; mac.length - 1) ? "-" : ""));    
  
  String macAdd = new String(sb);
  System.out.println(macAdd);    
  </code></pre>
  
  <p>It prints out the MAC address which for my Interface looks like :</p>
  
  <pre><code>70-F1-A1-A1-DF-F5
  </code></pre>
  
  <p>Can anyone please explain me the step :</p>
  
  <pre><code>String.format("%02X%s", mac[i], (i &lt; mac.length - 1) ? "-" : "")
  </code></pre>
  
  <p><em>Particularly</em> what does the string <code>%02X%s</code> mean ?  </p>