Java Reference
In-Depth Information
It is a compile-time error if a formal parameter that is declared
final
is assigned to within
the body of the method or constructor.
It is a compile-time error to use mixed array notation (§
10.2
) for a variable arity parameter.
The declared type of a formal parameter is denoted by the
Type
that appears in its parameter
specifier, followed by any bracket pairs that follow the
Identifier
in the declarator, except
for a variable arity parameter, whose declared type is an array type whose component type
is the
Type
that appears in its parameter specifier.
then a compile-time unchecked warning occurs for the declaration of the variable arity
expressions initialize newly created parameter variables, each of the declared type, before
execution of the body of the method or constructor. The
Identifier
that appears in the
De-
claratorId
may be used as a simple name in the body of the method or constructor to refer
to the formal parameter.
Invocations of a variable arity method may contain more actual argument expressions than
formal parameters. All the actual argument expressions that do not correspond to the form-
al parameters preceding the variable arity parameter will be evaluated and the results stored
A method or constructor parameter of type
float
always contains an element of the float
tains an element of the double value set. It is not permitted for a method or constructor
parameter of type
float
to contain an element of the float-extended-exponent value set that
is not also an element of the float value set, nor for a method parameter of type
double
to
contain an element of the double-extended-exponent value set that is not also an element
of the double value set.
Where an actual argument expression corresponding to a parameter variable is not FP-strict
ues drawn from the appropriate extended-exponent value sets. Prior to being stored in the
parameter variable, the result of such an expression is mapped to the nearest value in the