This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm having ArrayList collection. That ArrayListcontains Employee object. The Employee object contains Id, Name, Dept, DOJ, Address properties.
I have to print this ArrayList in a table format.
Could anyone please tell me how to display the print dialogue box and print the ArrayList values in table format?
What exactly do you mean by printing? On paper or on the command/terminal window?
What does toString() in Employee return?
Can you write a prettyPrintToString() or even a void prettyPrint() method in the Employee class? Then you could iterate through your List and call a pretty-printing method on each included Object.