"Thinking in Java" reading notes

xiaoxiao2021-03-06  99

Thinking in Java should be a great book, not only in its special release form (the author is very confident, it is quite love, with a big intellectual's mind and gas), which is more in the depth and meaning of book this content and The influence of it. I have read it last year, and I have seen the front of the next chapter. I feel very flavored when I read, I have a deep, and I will not be a bit of heart. The key is that me is that the Java is still a "half solution, and finally put it down. What is the basis of making SMS extraction procedures to make ME thinking: Is it too much? Is it really skilled in Java? It doesn't mean the grammar and new features, those who read DOCS can basically master the usage, but is not enough to understand the basic concepts of Java itself, the function's understanding is not enough! A small Byte to int conversion has turned ME, too ... Although this problem is solved by reviewing the Java Language Definition Description, it is not a comprehensive master of Java, especially the deficiencies without system concept. . Turning through "Bai Book House", ME saw this "Thinking in Java", this is already the third edition. From Preface and Introduction, it can be seen that approximately the end of 2002, there is already C # and .Net.

"Thinking in Java" reading notes. Excerpts and ME is not a knowledge point, especially the latter. Try to copy the original text, the translation of ME uses ◇ ◇ mark, your understanding is ★★ tag.

IT's Useful To Visualize Some Aspects of How Things Are Laid Out While The Program Is Running-in Particular How Memory IS Arranged. There Are Six Different Places To Store Data:

◇ How is something distributed in some things in the operation (actually how to assign management memory) have a visual outline. There are six places to store data: ◇

1, registers. ◇ Register. The speed is the fastest, inside the processor. But users cannot directly control it. ◇

2, The Stack. ◇ Stack. The speed and efficiency are high, second only to the register. Store in RAM, controlled by the stack pointer. Store the index of the object. The compiler needs to know the size in advance to control it. ◇

3, The HEAP. ◇ Pile. Store in RAM. Mainly stores objects. Because the location object is to be addressed, the efficiency is slightly lower. ◇

4, Static Storage. ◇ Static storage area. Also stored in the RAM, but the location will not change throughout the program. Members of the object can be declared as static, but the object is incomprehensible. ◇

5, Constant Storage. ◇ 常 constant storage area. In the embedded system, it can even be stored in the ROM in advance. ◇

6, NON_RAM Storage. ◇ Non-RAM storage area. It can be existently existed existed entirely in program control. A typical basic example is streamed Objects, Persistent Objects, which can be transferred in a stream in a stream in the program run, and the latter can be stored on the hard disk, and the program is read in memory next time. ◇

basic type

◇ 处 效 效 JAVA retains the basic type because each declares is too large to overhead. Boolean, CHAR, BYTE, SHORT, INT, Long, Float, Double, each have a corresponding package object such as Integer. In addition, in order to improve the calculation accuracy, two special classes Biginteger and BigDecimal are also provided. Each basic type takes up the number of internal boxes to be fixed, and the entire replaceability is considered. ◇

queue

◇ The queue declared, if you point to an object, all initialize the null; if the basic type of number of columns are declared, the compiler is automatically initialized to 0, and Boolean is False. ◇ No need to destroy object

◇ Scope concept. The garbage search collector automatically manages the object generated by the New statement. If there is no place in the field of view, it will automatically destroy it. This mechanism avoids the memory leak problem in traditional programming (MEMORY Leak). ◇

Basic type member's default value

The basic type member of the ◇ class is 0, where Boolean is false. It is mainly for an unusual error that is not initialized in the class. However, the variable in the method is not automatically initialized. ◇

Embedded HTML

Javadoc Passes HTML Commands Through To The Generated Html Document. This Allows You Full Use of Html; However, The Primary Motive Is To Let You Format Code, Such As:

/ **

*

* System.out.println (New Date ());

*

* /

转载请注明原文地址:https://www.9cbs.com/read-84279.html

New Post(0)