Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bb8ef2c

Browse files
Update README.md
1 parent a230cf2 commit bb8ef2c

File tree

1 file changed

+7
-0
lines changed
  • textbook work/java software solutions/2. Data and Expressions

1 file changed

+7
-0
lines changed

‎textbook work/java software solutions/2. Data and Expressions/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,10 @@ introduce the concepts of graphical programming, explore the relationship betwee
4343

4444
![image](https://user-images.githubusercontent.com/19383145/145309391-3ac9b9ca-64e6-4a33-957b-3e6e2ea0f1a4.png)
4545

46+
### Increment and Decrement Operators
47+
- The increment and decrement operators can be applied after the variable (such as ```count++``` or ```count--``` ), creating what is called the postfix form of the operator.
48+
- They can also be applied before the variable (such as ```++count``` or ```--count```), in what is called the prefix form.
49+
- When used alone in a statement, the prefix and postfix forms are functionally equivalent. That is, it doesn’t matter if you write ```count++``` or ```++count```.
50+
- When the increment or decrement operator is used in a larger expression, it can yield different results depending on the form used.
51+
- For example, if the variable count currently contains the value 15, the following statement assigns the value 15 to total and the value 16 to count: ```total = count++;```
52+
- the following statement assigns the value 16 to both total and count: ```total = ++count;```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /