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

Sequence point concept is valid in java or not

 
Abhishek KumarSoni
Ranch Hand
Posts: 61
Chrome Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20763
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic