摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
1 /* 2 Difference between 'for' and 'while'. 3 We can transform everything between 'for' and 'while'. 4 if the incremnet is just use for ... 阅读全文
摘要:
具体数值不多,而是符合byte short int char这四种类型,建议使用swtich语句。因为效率稍高。其他情况:对区间判断,对结果为boolean类型判断,使用if,if的使用范围更广。 阅读全文
摘要:
ternary operator: advantage: make a terse simple conditional assignment statement of if-then-else. disadvantage: if must contains return type,... 阅读全文