> What does it print in out ? And why?
>
[quoted text clipped - 6 lines]
>
> }
I smell homework.

Signature
Is it a bird? It is a plane? No, it's: http://hpl.hp.com/conferences/juc2007/
WARNING. Various parts of this product may be more than one billion years old.
Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England
> What does it print in out ? And why?
>
[quoted text clipped - 6 lines]
>
> }
For the first question, compile and run the program and you will find out.
You could also read the Java Language Specification (JLS) for that
information, and it will tell you why.
<http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html>
Hint: Order of evaluation.
<http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.7>
As far as the prefix and postfix increment operators go:
<http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.14.2>
<http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.15.1>
From the tutorials:
<http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op1.html>
<http://java.sun.com/docs/books/tutorial/java/nutsandbolts/expressions.html>
Learn to use the Sun website for tutorials and specifications.

Signature
Lew
vahan - 22 May 2007 06:28 GMT
> > What does it print in out ? And why?
>
[quoted text clipped - 29 lines]
> --
> Lew
Any way, many thanks to all
Andrew Thompson - 22 May 2007 07:38 GMT
>> > What does it print in out ? And why?
(snip many links from Lew)
...
>...many thanks to all
Please don't forget to report back your conclusions
after reading the links given by Lew. I could guess
what it would print by eyeballing the code, but the
*explanation* was in the links.

Signature
Andrew Thompson
http://www.athompson.info/andrew/