I have never been written by myself today, I have written it myself today. I am very excited. The new task of this week is that employee training requires each person to teach the experience of Think in Java. I have to say simple 4, 5 chapters. For gossip, don't write a teaching plan! Chapter 4 Initialization and Clear "Initialization" and "Clear" are two of these security issues. Most of the errors in many C processes are caused by programmers forgetting to initialize a variable. For ready-made libraries, if users don't know how to initialize a component, this is often the error. Clearance is another special problem, because after using an element, it is easy to forget because it is no longer concerned. In this way, the resource occupied by that element will keep it, and it is easy to generate the consequences of resources (mainly memory). C introduces the concept of "builder" for us. This is a special method that is automatically called after an object creation. Java also used this concept, but added its own "garbage collector" to automatically release them when resources are no longer needed. For initialization, it can imagine into the initialize () method in each program, that is Rock {Rock () {// This method is a constructor, which is characterized by no return value, and the class name is consistent, which is also the two conditions that the constructor must satisfy System.out.println ("CREATING ROCK") }} Public class simpleconstructor {public static void main (String [] args) {for (int i = 0; i <10; i ) new rock ();}} This is a basic routine!