摘要: package com.jckb; /** * 冒泡排序 * @author gx */ public class BubbleSort { public static void main(String[] args) { int[] arr = { 6, 3, 8, 2, 9, 1 }; for (int i =... 阅读全文
posted @ 2016-12-29 22:36 郭鑫 阅读(198) 评论(0) 推荐(0) 编辑
摘要: package com.jckb; import java.util.Map; import java.util.Set; import java.util.TreeMap; /**TreeMap * 可以进行排序 * @author gx * */ public class Test4 { public static void main(String[] args) { ... 阅读全文
posted @ 2016-12-29 21:36 郭鑫 阅读(183) 评论(0) 推荐(0) 编辑
摘要: package com.jckb; import java.util.HashSet; public class Test3 { public static void main(String[] args) { m(); } static void m(){ HashSet p= new HashSet(); ... 阅读全文
posted @ 2016-12-29 21:17 郭鑫 阅读(350) 评论(0) 推荐(0) 编辑
摘要: //年龄的自定义异常类 package com.jckb; public class PersonException extends Exception{ public PersonException(String msg) { super(msg); } } //测试类 package com.jckb; public class TestPerson ... 阅读全文
posted @ 2016-12-29 19:57 郭鑫 阅读(181) 评论(0) 推荐(0) 编辑