- 博客(1)
- 资源 (1)
- 收藏
- 关注
转载 TreeSet类 Comparator与Comparable
1、TreeSet类是SortedSet接口的实现类。可以确保集合中的元素保持有序状态。根据红黑树的存储方式来存储集合元素,中间用到的比较可以通过两种方式实现: 待存入集合的对象元素继承重写Comparable接口中的comparator()方法完成, 继承重写Comparator接口中的compare()方法,然后将Comparator接口实现类的对象传给TreeSet的构造函数,建
2013-11-11 20:41:44
338
数据仓库图
public class SearchCourseServlet extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("GBK");
response.setContentType("text/html;charset=GBK");
CourseDao courseDao=new CourseDao();
List courseList=null;
2015-05-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人