Hi, I get a List object containing pojo class objects in a table. in my case, I have to show the table data in reverse order. means that for I add some rows to a specific table in the database, when I added recently, the data is stored in the last row in the table (in the database). here I have to show all the contents of the table on my jsp page in reverse order, meaning that what I inserted recently should display the first row on my jsp page.
here my code was like
List lst = tabledate.getAllData();
Iterator it = lst.iterator();
MyTable mt = new MyTable();
while(it.hasNext())
{
mt=(MyTable)it.next();
System.out.println(mt.getxxx());
System.out.println(mt.getxxx());
System.out.println(mt.getxxx());
System.out.println(mt.getxxx());
}
source
share