How can I utilize System.out.print(ln/f)
in a way that will allow me to format my output into a table?
If I'm to use printf
, what formatting should I specify to achieve the below results?
Example table I'd like to print:
n result1 result2 time1 time2
-----------------------------------------------------
5 1000.00 20000.0 1000ms 1250ms
5 1000.00 20000.0 1000ms 1250ms
5 1000.00 20000.0 1000ms 1250ms
With everything lined up nice and pretty?