i++ is an expression because it has a value that you can assign to a variable, pass as an argument to a method, etc.
If you simply have i++and do nothing with its value, you use it as an instruction, that is, only for its side effects, and not for its value.
source
share