Java Reference
In-Depth Information
sure that
pvec
references a
ColoredPoint[]
:
cpvec = (ColoredPoint[])pvec; // OK, but may throw an
// exception at run time
5.3. Method Invocation Conversion
Method invocation conversion
is applied to each argument value in a method or constructor
ted to the type of the corresponding parameter.
Method invocation contexts allow the use of one of the following:
• an identity conversion (§
5.1.1
)
sion
version.
If, after the conversions listed above have been applied, the resulting type is a raw type
It is a compile-time error if the chain of conversions contains two parameterized types that
are not in the subtype relation.
A value of the null type (the null reference is the only such value) may be converted to any
reference type.
If the type of the expression cannot be converted to the type of the parameter by a conver-
sion permitted in a method invocation context, then a compile-time error occurs.
If the type of an argument expression is either
float
or
double
, then value set conversion
• If an argument value of type
float
is an element of the float-extended-exponent
value set, then the implementation must map the value to the nearest element of
the float value set. This conversion may result in overflow or underflow.