0

Is there any library to get the string representation of any type of 2d Java array as tables

with borders like the one in MySQL command line client?

I found related posts about pretty print 2d array but they are working for only String type of arrays.

haluk
  • 1,148
  • 2
  • 9
  • 19
  • Could you add an example for those not familiar with MySQL command client? – Kuba Spatny May 14 '14 at 19:42
  • Have a look at [Formatting](http://docs.oracle.com/javase/tutorial/essential/io/formatting.html) – Braj May 14 '14 at 19:42
  • What type of object 2D array contain? – Braj May 14 '14 at 19:44
  • it contains double values, but it would be great if it is generic. – haluk May 14 '14 at 19:45
  • 1
    I think you could use the code used in http://stackoverflow.com/questions/11383070/pretty-print-2d-array-in-java just change the parameters to `Object[][]`, because the method `getCellValue(value)` returns `value.toString()`. – Kuba Spatny May 14 '14 at 19:51

0 Answers0