上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页
摘要: Ref: Java 6 Thread States and Life CycleThis is an example of UMLprotocol state machinediagram showingthread statesandthread life cyclefor the Thread... 阅读全文
posted @ 2014-03-18 20:56 wonkju 阅读(483) 评论(0) 推荐(0) 编辑
摘要: Here is the code: 1 /* 2 Some class,such as a config file,need to be only one.So we need to control the instance. 3 1,private the constructor and crea... 阅读全文
posted @ 2014-03-08 22:59 wonkju 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Here is the code: 1 /* 2 Instance invocation in the memory: 3 4 */ 5 package kju.obj; 6 7 import static kju.print.Printer.*; 8 public class NonStati... 阅读全文
posted @ 2014-03-08 21:21 wonkju 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 member variable and static variable: 3 1,invoke ways: 4 member variable,also called 'instance' variable,which can only be invoked by instance.... 阅读全文
posted @ 2014-03-07 12:38 wonkju 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Ref: Initializing Fields Instance initializers are permitted to refer to the current object via the keywordthis,Ref: Instance Initializers 1 /* 2 I... 阅读全文
posted @ 2014-03-06 20:42 wonkju 阅读(241) 评论(0) 推荐(0) 编辑
摘要: Access control is often referred to as implementation hiding. Wrapping data and methods within classes in combination with implementation hiding is ... 阅读全文
posted @ 2014-03-06 09:43 wonkju 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 49 下一页