15.25.1
Simple Assignment Operator
=
EXPRESSIONS
for the same reason; the right hand operand is not evaluated and no assign 
ment occurs.
Otherwise, the right hand operand is evaluated. If this evaluation completes
abruptly, then the assignment expression completes abruptly for the same rea 
son and no assignment occurs.
Otherwise, the value of the right hand operand is converted to the type of the
left hand variable and the result of the conversion is stored into the variable.
If the left hand operand expression is an array access expression ( 15.12), then
many steps are required:
First, the array reference subexpression of the left hand operand array access
expression is evaluated. If this evaluation completes abruptly, then the assign 
ment expression completes abruptly for the same reason; the index subexpres 
sion (of the left hand operand array access expression) and the right hand
operand are not evaluated and no assignment occurs.
Otherwise, the index subexpression of the left hand operand array access
expression is evaluated. If this evaluation completes abruptly, then the assign 
ment expression completes abruptly for the same reason and the right hand
operand is not evaluated and no assignment occurs.
Otherwise, the right hand operand is evaluated. If this evaluation completes
abruptly, then the assignment expression completes abruptly for the same rea 
son and no assignment occurs.
Otherwise, if the value of the array reference subexpression is
null
, then no
assignment occurs and a
NullPointerException
is thrown.
Otherwise, the value of the array reference subexpression indeed refers to an
array. If the value of the index subexpression is less than zero, or greater
than or equal to the length of the array, then no assignment occurs and an
IndexOutOfBoundsException
is thrown.
Otherwise, the value of the index subexpression is used to select a component
of the array referred to by the value of the array reference subexpression. This
component is a variable; call its type
SC
. Also, let
TC
 be the type of the left 
hand operand of the assignment operator as determined at compile time.
N
If
TC
 is a primitive type, then
SC
 is necessarily the same as
TC
. The value of
the right hand operand is converted to a value of type
TC
 and stored into the
selected array component.
370






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved