A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 而今从头越2012 中级黑马   /  2012-12-27 14:53  /  848 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

StroesDaoImpl ib =new StroesDaoImpl();  
List  list = ib.findByType(IStroeDao.CLOTHING);  
Collections.sort(list);  
for(int i=0;i<list.size();i++){
Stroes stroes=(Stroes)list.get(i);
}



System.out.println(stroes.getType());
对集合进行了升序排序,可是却报错,怎么回事,请各位给出解答。

1 个回复

倒序浏览
额, 你的StroesDaoImpl是什么东西?
findByType又是什么方法? 反射里的?
findByType 返回的是什么? 其类中实现了比较性了么?

没头没脑的问题真蛋疼。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马