小妹急求解决问题,哪位高手帮忙解决一下?比如能在一行显示3条记录,然后再换行,有分页的列表
我在代码如下:
int total=list.size();
int count=0;
Iterator it=list.iterator();
CoolWebInfo coolweb;
while(count<(page-1)*10&&it.hasNext()){//分页显示,每页显示10条记录
it.next();
count++;
}
count=0;
while(it.hasNext()){
coolweb=(CoolWebInfo)it.next();
coolweb_id=coolweb.getCoolweb_id();
coolweb_name=coolweb.getCoolweb_name();
coolweb_type=coolweb.getCoolweb_type();
coolweb_http=coolweb.getCoolweb_http();
coolweb_date=coolweb.getCoolweb_date();
coolweb_address=coolweb.getCoolweb_address();
out.println<"我要输出的内容">");
count++;
}
以上是我的代码,但是只能以列循环,不能以行循环。
各位大哥,帮帮小妹,急解决!