Home / Java Tips Generated By ChatGPT / Increment and Decrement Operators in Java Use ++ and — to increase or decrease a value by one. These can be prefix or postfix operators. Source Code int a = 5; a++; // Now a is 6 a--; // Back to 5 System.out.println("a after increment and decrement: " + a);