摘要: 1异常中要了解的几个方法public String getMessage(); //返回异常信息public String toString(); //返回异常的简单信息描述,此对象的类的name(全路径名) ": "(冒号和一个空格)+调用此对象getLocalizedMess... 阅读全文
posted @ 2015-08-24 23:38 chengling 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.hello; 2 import java.util.Set; 3 import java.util.HashSet; 4 /* 5 * List:有序(存储顺序和取出顺序一致),可重复 6 * Set:无序(存储顺序和取出顺序不一致),唯一 7 * 特点: 8 *... 阅读全文
posted @ 2015-08-24 23:24 chengling 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 3 4 import java.util.ArrayList; 5 import java.util.Collection; 6 import java.util.Iterator; 7 8 9 10 public class Test01 {11 ... 阅读全文
posted @ 2015-08-24 16:06 chengling 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 3 import java.util.Date; 4 5 6 7 /* 8 * Date类 : 表示特定的瞬间,精确到毫秒 9 * 构造方法10 * Date(... 阅读全文
posted @ 2015-08-24 16:05 chengling 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 3 4 /*System类 5 * 6 * public static void gc() 运行垃圾回收器 只有在执行大量的对象的释放,才调用垃圾回收。 7 * public static void exit(int sta... 阅读全文
posted @ 2015-08-24 11:06 chengling 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 import java.util.Random; 3 /* 4 * Random类 5 * 此类用于产生随机数 6 * 构造方法: 7 * public Random():没有种子,用的是默认种子,是当前时间的毫秒值 8 * ... 阅读全文
posted @ 2015-08-24 09:22 chengling 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1 package test; 2 3 /* 4 *Math:数学运算 5 * 成员变量 6 * PI E 7 * 8 * 成员方法 9 * public static int abs(int a) 绝对值10 * public static ... 阅读全文
posted @ 2015-08-24 09:21 chengling 阅读(209) 评论(0) 推荐(0) 编辑