I chose the second edition when reading this book because the translator is Hou Jie ..
First, there are five basic guidelines for introduction to object.
Then let's talk about the generation and destruction of objects. In many cases, C ++ compares them.
Although many people on the Internet say this book is not suitable for beginners, I think it can be used directly.
In particular, many of the C ++ camp's students are also transitioning from C ++. the basics are good.
Of course, there are some mysteries that you won't be able to read twice or twice... Write wellCodeRight
Below I will write some texts in my notebook, which are basically some of the most important topics in the previous chapters.
Stack memory:
C ++ generates the default object in the stack area. If the object knows the quantity, lifetime, type, and other information during the execution period, you must apply for and release the object using manual memory.
This practice sacrifices efficiency in exchange for elasticity (but there is a serious risk of Memory leakage)
In Java, objects (except basic types) must be generated in the stack and have a powerful Garbage Collector mechanism.
Binding of member functions:
C ++ is non-dynamic by default.
By default, Java is dynamic. In C ++, all member functions are virtual functions.
Single inheritance system:
All classes in Java inherit from a single basic class: Object