Friday, November 2, 2018

java - How does Array indexing work?




Can someone explain array[++index] vs array[index++]?



I am reading a data structure book and it seems like this notation does have a difference.


Answer




array[++index] - which means increment to variable index in current statement itself.
array[index++] - which means increment to variable index after executing current statement.




No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...