会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
秋天很好
2018年8月14日
两种比较器Comparable 和 Comparator
摘要: //通过两种比较器排序 //比较器 // //Comparable:自然排序使用 // 规则: // this属性 参数对象o属性 比较 // this > o 正数 // this { private String no; private String name; private int num; public String getNo() { ...
阅读全文
posted @ 2018-08-14 19:50 秋天很好
阅读(184)
评论(0)
推荐(0)
编辑
泛型
摘要: //练习泛型 public class TestFanx { public static void main(String[] args) { Apple1 a1 = new Apple1();//a1为Integer //Apple1 a2 = new Apple1();继承了Number只能接受Number Apple1 a2 = new Apple1(); a1.setS...
阅读全文
posted @ 2018-08-14 19:48 秋天很好
阅读(118)
评论(0)
推荐(0)
编辑
导航
博客园
首页
新随笔
联系
订阅
管理
公告