I am trying to output information with System.out.format using a double[] array as the argument. This does not work:
out.format("New dimensions:\n" +
"Length: %f\n" +
"Width: %f\n\n",
doubleArray);
This, however, does:
out.format("New dimensions:\n" +
"Length: %f\n" +
"Width: %f\n\n",
doubleArray[0], doubleArray[1]);
Why doesn't the first format work? It supposedly works with strings just fine.