Java Reference
In-Depth Information
Point(int x, int y) { this.x = x; this.y = y; }
}
This is useful, for example, in preventing instantiation by declaring an inaccessible
8.8.1. Formal Parameters and Type Parameters
The formal parameters and type parameters of a constructor are identical in syntax and se-
8.8.2. Constructor Signature
It is a compile-time error to declare two constructors with override-equivalent signatures
It is a compile-time error to declare two constructors whose signatures have the same eras-
8.8.3. Constructor Modifiers
ConstructorModifiers:
ConstructorModifier
ConstructorModifiers ConstructorModifier
ConstructorModifier: one of
Annotation
public protected private
T
has a (meta-)annotation
m
that corresponds to
java.lang.annotation.Target
, then
m
must have
an element whose value is
java.lang.annotation.ElementType.CONSTRUCTOR
, or a compile-time
error occurs.