Needed for printf()
like formatting
(replaces variable length argument lists
Possibly a good idea.
An example:
public static void main(String[] args) {
double result = sum({1.2, 2.4, 3.5, 4.9});
System.out.println(result);
}
public static double sum(double[] x) {
double sum = 0.0;
for (int i = 0; i < x.length; i++) {
sum += x[i];
}
return sum;
}
}