Home >Java >Javagetting Started >How to operate '--' in Java operator

How to operate '--' in Java operator

王林
王林Original
2019-11-23 14:13:033630browse

How to operate '--' in Java operator

"--" operation examples are as follows:

int i = 1;
int j1 = i--; // 先将i的原始值(1)赋值给变量j1(1),然后i变量的值减1
int j1 = --i; // 先将i变量的值减1,然后将i的当前值(0)赋值给变量j1(0)

Recommended tutorial: javaQuick Start

The above is the detailed content of How to operate '--' in Java operator. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn