摘要: We have to keep in mind that,the 'new' keyword create an array at the runtime rather that at the compile time,that is,at the compile time,jvm just c... 阅读全文
posted @ 2014-03-04 19:34 wonkju 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 nest for loop demo. 3 Note that,'upside' triangle controls 'inner condition'. 4 */ 5 import kju.print.Print; 6 public class Pyramid { 7 pu... 阅读全文
posted @ 2014-03-04 13:21 wonkju 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 Difference between 'for' and 'while'. 3 We can transform everything between 'for' and 'while'. 4 if the incremnet is just use for ... 阅读全文
posted @ 2014-03-04 02:33 wonkju 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 具体数值不多,而是符合byte short int char这四种类型,建议使用swtich语句。因为效率稍高。其他情况:对区间判断,对结果为boolean类型判断,使用if,if的使用范围更广。 阅读全文
posted @ 2014-03-04 01:28 wonkju 阅读(166) 评论(0) 推荐(0) 编辑
摘要: ternary operator: advantage: make a terse simple conditional assignment statement of if-then-else. disadvantage: if must contains return type,... 阅读全文
posted @ 2014-03-04 00:32 wonkju 阅读(170) 评论(0) 推荐(0) 编辑