Is there a way to conveniently use String.format (or printf) to print the values in an array. Example:
public static void main(String[] args) {
System.out.printf("Today is %tc and your args are %TAG", new Date(), args);
}
The output I'm looking for:
Today is Sat Oct 14 14:54:51 CEST 2017 and your args are uno dos tres
As the example suggests, I don't know how long the args array is? So far the only solution I've come up with is to first use .format to do get the first part of the string, then loop through the args array and append space separated chunks.