constructor
All > Technology > Programming > Java
- A constructor is automatically called when an instance of its class is created. A constructor always has the same name as its class, and has no return type. For instance
public class Ship { public Ship(String name){ ... } ... }A class with no explicit constructor has an implicit no-arg constructor, which takes no arguments and has an empty body.
David J. Barnes - Cite This Source - This Definition - A pseudo-method that creates an object. In the Java programming language, constructors are instance methods with the same name as their class. Constructors are invoked using the
newkeyword.
Sun Microsystems - Cite This Source - This Definition - class method, immutable object, Instance, instance method, instantiation, Object, object construction, string
- Any "class method", instance "method", or "subroutine" that composes, initializes, blesses, and returns an "object". Sometimes we use the term loosely to mean a "composer".
Perl - Cite This Source - This Definition - Attribute, bless, construct, indirect object, indirect object slot, Instance, instance variable, IO, Object, operator overloading, stringification