Java, System.out.println() with an assignment inside
<p>I just noticed that you can do <code>System.out.println(FooObject.fooNumber = 4);</code> which will assign 4 to fooNumber and also output the value 4. Why does it output FooNumber after the assignment?
Also, the rules of precedence state that the assignment occurs first but nothing about whether the print occurs first or the assignment. Am I right? So why doesn't the previous value get printed first and then the assignment? As I know, subexpressions are evaluated left to right in Java, so does this apply here?</p>
