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.