Java Tutorial 41 - Constructors

12 Views
Published
Constructors

- Initialize the instance variables of an object.

- Constructors must have the same name as the class itself.
- Constructors do not have a return type—not even void.
- Constructors are invoked using the new operator when an object is created.
Be the first to comment