摘要: from:http://lehsyh.javaeye.com/blog/569674 修正了原文的一点错误 class Parent {     static String name = "hello";     static {        ... 阅读全文
posted @ 2010-10-16 05:41 irischan 阅读(860) 评论(0) 推荐(0) 编辑
摘要: from:http://www.blogjava.net/realsmy/archive/2007/04/10/109256.html from:http://www.wljcz.com/html/j2se/javajc/2010/0408/3262.html from:http://www.javaeye.com/topic/72543 from:http://www.dingkao.co... 阅读全文
posted @ 2010-10-16 04:31 irischan 阅读(4737) 评论(0) 推荐(1) 编辑
摘要: 原题: short s1; s1+=1;//(1) s1=s1+1;//(2) 问有什么错。 一开始想了半天都觉得正常。面试之后想了半天才发现没初始化。但是还有个陷阱没有注意到。。。 (1)的错误在于,没有初始化s1。 (2)的错误在于,1>没有初始化 2>s1+1返回一个整型结果,不能自动截断为short类型。 改正后,应为: short s1=0; s1+=1; s1=(short... 阅读全文
posted @ 2010-10-16 04:06 irischan 阅读(518) 评论(1) 推荐(1) 编辑
摘要: 注意:this的指向 In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of.   from:http://www.ruanyifeng.com/blog/2009/... 阅读全文
posted @ 2010-10-16 01:55 irischan 阅读(1128) 评论(0) 推荐(0) 编辑