title: Java printf functionality for collections or arrays
body: <p>In python you can use a tuple in a formatted print statement and the tuple values are used at the indicated positions in the formatted string.  For example:</p>
  
  <pre><code>&gt;&gt;&gt; a = (1,"Hello",7.2)
  &gt;&gt;&gt; print "these are the values %d, %s, %f" % a
  these are the values 1, Hello, 7.200000
  </code></pre>
  
  <p>Is there some way to use any array or collection in a java printf statement in a similar way?</p>
  
  <p>I've looked at the <a href="http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax" rel="nofollow noreferrer">documentation</a> and it appears to have built in support for some types like Calendar, but I don't see anything for collections.  </p>
  
  <p>If this isn't provided in java, is there any java idiom that would be used in a case like this where you are populating collections and then printing the values from many collections using one format string (other than just nested looping)?</p>