2018年8月14日

摘要: //通过两种比较器排序 //比较器 // //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) 编辑

导航