GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Sequence point concept is valid in java or not 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 "Sequence point concept is valid in java or not" Watch "Sequence point concept is valid in java or not" New topic
Author

Sequence point concept is valid in java or not

Abhishek KumarSoni
Ranch Hand

Joined: Nov 05, 2013
Posts: 61

Hello friends
i was performing a c program today which was as follow
Reason for this unexpected behaviour was given that in c a single variable can change its value only once within a single sequence point.
But if I run this program as a java program output will be 21 and 110.mean expected value.
So friends just wanted to confirm does java also have such kind of concept if yes than what are sequence point in Java.Are they same as c's sequence point.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

You mean this?

MSDN wrote:Between consecutive "sequence points" an object's value can be modified only once by an expression.


Java doesn't have any such concept.
 
GeeCON Prague 2014
 
subject: Sequence point concept is valid in java or not