Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Evaluation order Vs Execution order

 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody explain the difference?
TIA,
- Manish
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
evaluation order vs execution order of what ??
Could you be more precise please? Thanks
 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of an expression, such as -
b = a++ * c<<d-- blah ....
Sorry, I should have made it clear earlier.
TIA,
- Manish
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still don't see what you mean by execution order...
When such an statement as the one you provided is executed, the arithemtic expression is contains is evaluated according to operator precedence.
Please consult the following links:
15.7 Evaluation Order
Java cheat sheet (see Precedence at the end of the page)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic