Want to print key values in a list as an header and values under the header column
posted 6 years ago
I have a requirement, where in I have a list object which contains header name and the value. I'm trying to iterate over the list and print the header and values in the row pattern.
For example key = A and value = abc, Key = B and value = abc1, Key = C and value = abc2, these are stored in the ArrayList. I want to print them like below
A B C
abc abc1 abc2
Can anybody suggest me the idea. dataTable is printing the values in singles column.