[Java self-study notes # # Day 18] initialization of each part of the program

Textbook: "Java core technology Volume"

Chapter Four Objects and Classes

First, prone to ambiguity of theoretical knowledge

1, this statement invokes another constructor with the constructor of the same class, for example:

public Employee(double s)
{
    the this ( " the Employee # " + nextId, S); ... // no need to write the code in double quotation marks in the content
}

Direct parameters to the constructor to another.

Second, the problem to be solved follow-up study

1, how to provide a close approach to complete the cleanup work;

2, shutdown hook is how one thing;

3, how to register a class action with Cleaner;

4, how to achieve encapsulation module java programming.

Guess you like

Origin www.cnblogs.com/yizhinailu/p/12543450.html