title: Formatting a string array in java
body: <p>I have a string array which has k elements. I want to print them out using System.out.format, but the issue is that I do not know k. So essentially, I want to use something like:
  <code>System.out.format("%s %s ... k times", str1, str2, ... strk);</code>
  (where k is a variable)</p>
  
  <p>I was looking through the java documentation, but could not find a way to do this. Is there a simple way out? </p>
  
  <p>Thanks!</p>