2014年10月11日
摘要: if(username.equals(“zxx”){}username可能为NULL,会报空指针错误;改为"zxx".equals(username)Java中的空指针错误是指的是什么样子的错误Java中空指针本身的错误是因为对一个空变量本身进行了操作 阅读全文
posted @ 2014-10-11 21:36 yuyezhulan 阅读(148) 评论(0) 推荐(0) 编辑
摘要: java中静态变量本质为类变量,而实例变量则为类的实例变量 阅读全文
posted @ 2014-10-11 21:07 yuyezhulan 阅读(98) 评论(0) 推荐(0) 编辑
摘要: java中final修饰的引用变量本身不能发生变化,但引用的内容还是能够发生变化的。 阅读全文
posted @ 2014-10-11 20:46 yuyezhulan 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1.Java中char和Unicode ,char存储Unicode的字符串 阅读全文
posted @ 2014-10-11 20:18 yuyezhulan 阅读(555) 评论(1) 推荐(0) 编辑
摘要: int arr[][] ={{1,2,3},{4,5,6,7},{9}};boolean found = false;for(int i=0;i<arr.length&& !found;i++) {for(int j=0;j<arr[i].length;j++){System.out.println... 阅读全文
posted @ 2014-10-11 20:13 yuyezhulan 阅读(710) 评论(0) 推荐(0) 编辑