摘要:
Ref: Java 6 Thread States and Life CycleThis is an example of UMLprotocol state machinediagram showingthread statesandthread life cyclefor the Thread... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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.... 阅读全文
摘要:
Ref: Initializing Fields Instance initializers are permitted to refer to the current object via the keywordthis,Ref: Instance Initializers 1 /* 2 I... 阅读全文
摘要:
Access control is often referred to as implementation hiding. Wrapping data and methods within classes in combination with implementation hiding is ... 阅读全文
摘要:
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... 阅读全文