This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Evaluation order Vs Execution order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Evaluation order Vs Execution order" Watch "Evaluation order Vs Execution order" New topic
Author

Evaluation order Vs Execution order

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2583

Can somebody explain the difference?
TIA,
- Manish
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
evaluation order vs execution order of what ??
Could you be more precise please? Thanks


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2583

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

Joined: Aug 26, 2001
Posts: 7610
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)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Evaluation order Vs Execution order