Java Increment and Decrement Operators i++ and i--
It is very common to increment and decrement a variable. Java provide the ++ or -- unary operators to do this task.
int i = 0;
i++; //increment
i--; //decremnt
You can place these operators before or after a variable. If an increment or decrement are the only operations in a statement, there is no difference between prefix and postfix notation.
Please SUBSCRIBE to Appficial, and check out more Java Programming Tutorials! http://www.appficial.com
Increment and Decrement Operators
• Video
The While Loop
• Java While Loop by Example - Java Pro...
Infinite Loops
• Java Infinite Loop by Example in a Wh...
Do-While Loop
• Java Do While Loop - Easy Java Tutor...
Do-While Loop Example Where User Prompts to Start Program Over
• Java Do While Loop Example Where User...
For Loop
• Java For Loop - How to Use the For Lo...
Nested Loop
• Java Nested Loops by Example using a ...
How to Determine Which Loop to Use?
• Deciding which Java Loop Structure to...
Sentinal Value
• Java Sentinal Value in a While Loop -...
Input Validation using Loops
• Java Input Validation with a While Lo...
Break and Continue Statements in a Looping Structure
• Java Break and Continue Statements in...
Enumerations
• Java Enumerations - The Enum Type for...