Constructors
suggest changeIntroduction
A class does not have to declare a constructor. If it declares none, and it is not an interface, the compiler supplies a default constructor. A constructor initializes a new instance. It is not a method. This topic demonstrates how to use constructors.
Remarks
The Java Language Specification talks at length about the exact nature of constructor semantics. They can be found in JLS ยง8.8
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents