Friday, June 08, 2007

Little Sugar (Compound Assignment operator And Implicit Type Conversion)

x += i

'+=' This is what is called the compound assignment operator in Java . An interesting thing about this operator is that , this operator automatically casts the type of expression on the right , which in this case is i to the type of the expression on the left which being x .

No comments: