Is a default constructor responsible for initializing members to default values?

226 views Asked by At

A default constructor initializes all instance and class members to its default value.

is above statement True or False?

1

There are 1 answers

2
Chris Martin On

No. The default constructor does nothing other than call super().

Instance fields are always initialized to their default values before any constructors are run (it isn't the constructor that does it).

And, of course, static fields ("class members") are not initialized by a constructor. That'd be silly.