<<< Primitive and Object Reference Variables, cont. | Index | Constructors, cont. >>> |
Constructor has the same name as its class
If no constructor method exists in a class, then Java compiler will supply a default constructor.
When default constructor creates an object, it initializes
each primitive field to zero
each object reference field to null.
<<< Primitive and Object Reference Variables, cont. | Index | Constructors, cont. >>> |