目录

《Head First Java》读书笔记(四)

摘要
《Head First Java》读书笔记(四)。

Chapter 9 Life and Death of an Object

The stack and the heap, where objects and variables live

Methods on the stack

Where local variables live

Where instance variables live

The miracle of object creation

Constructors (the code that runs when you say new)

Initializing the state of a new Duck

Overloaded constructors

Superclass constructors (constructor chaining)

Invoking overloaded constructors using this()

Life of an object

Garbage Collection (and making objects eligible) Exercises and puzzles