上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 32 下一页
摘要: package com.bjpowernode.t03sort; import java.util.ArrayList;import java.util.Collections; /* * 向集合中添加Person类型并对其排序 */public class TestSort02 { public 阅读全文
posted @ 2018-08-30 17:47 Monica_维维 阅读(414) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t03sort; import java.util.ArrayList;import java.util.Collections; /* * List中存放字符串进行排序 */public class TestSort01 { public stati 阅读全文
posted @ 2018-08-30 17:46 Monica_维维 阅读(5878) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t02generic; /* * 泛型模板 */public class TestGeneric04 { public static void main(String[] args) { //自定义类型使用泛型 MyList<Integer> ml = 阅读全文
posted @ 2018-08-30 17:44 Monica_维维 阅读(173) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t02generic; /* * 泛型模板 * 自定义一个类使用泛型 */public class MyList<E> { E e; public E getE() { System.out.println(e.getClass()); return 阅读全文
posted @ 2018-08-30 17:44 Monica_维维 阅读(387) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t02generic; import java.util.ArrayList;import java.util.LinkedList;import java.util.List; /* * 泛型的通配符 */public class TestGener 阅读全文
posted @ 2018-08-30 17:43 Monica_维维 阅读(156) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t02generic; import java.util.ArrayList;import java.util.Iterator;import java.util.LinkedList;import java.util.List; /* * 使用泛型解 阅读全文
posted @ 2018-08-30 17:43 Monica_维维 阅读(221) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t01list; import java.util.ArrayList; /* * 向集合中添加自定义类型 */public class TestList04 { public static void main(String[] args) { Arr 阅读全文
posted @ 2018-08-30 17:41 Monica_维维 阅读(397) 评论(0) 推荐(0) 编辑
摘要: package duotai; public class Animal { int age; public void eat() { System.out.println("吃饭"); } public void sleep() { System.out.println("睡觉"); }} 狗狗类 阅读全文
posted @ 2018-08-30 17:32 Monica_维维 阅读(630) 评论(0) 推荐(0) 编辑
摘要: package com.bjpowernode.t02inheritance.c09; /* * 使用super调用父类的构造方法 */public class TestSuper02 { public static void main(String[] args) { IPhoneX iPhone 阅读全文
posted @ 2018-08-30 16:49 Monica_维维 阅读(463) 评论(0) 推荐(0) 编辑
摘要: package charter05; public class Animal { int age = 8; //如果父类中显示的声明了有参的构造方法, //而子类中没有显示的声明有参构造方法,此时编译会报错 public Animal(int age) {// super(); this.age = 阅读全文
posted @ 2018-08-30 15:53 Monica_维维 阅读(622) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 32 下一页