Increment and Decrement operators in Detail




This video tutorial explains the increment and decrement operators available in java programming.

You will learn what are the increment and decrement operators, what is the use of them, how to use them, what is the prefix form, what is the postfix form, difference between prefix and postfix form in detail with example.

Source code for this video tutorial


package LearningJava;

public class Fish {

 public static void main(String[] args) {
  
  int x = 10;
  
--x;
System.out.println(x);  
System.out.println(--x);
System.out.println(x);

 }

}