I think you understood the concept of increment and decrement wrong, you see, in the first case you are actually decreasing the balance variable at -100, however; in the second case you are assigning the value -100 to the variable.
See the example below for a decrease:
class Teste {
public static void main(String[] args) {
int saldo = 14000;
int i = 0;
for(i=0; i < 5; i++) {
saldo -= 100; //Aqui tem um decremento
System.out.println("saldo : "+ saldo);
}
}
}
Your result is:
saldo : 13900
saldo : 13800
saldo : 13700
saldo : 13600
saldo : 13500
Now notice if you do the inverse, which is to put the signal - after the assignment signal =, getting sando =- 100
class Teste {
public static void main(String[] args) {
int saldo = 14000;
int i = 0;
for(i=0; i < 5; i++) {
saldo =- 100; //Aqui tem uma atribuição, isto é, mesma coisa que saldo = -100;
System.out.println("saldo : "+ saldo);
}
}
}
Result, it was -100 at all, because at each loop the balance variable was assigned the value of -100:
saldo : -100
saldo : -100
saldo : -100
saldo : -100
saldo : -100