Java - Decrement statement: --
Decrement statement it is a mathematical operation that is used to decrease the number by one.--
Description
-- var ;
Input
- var - value receiver
Examples
Java
Even one example in what situations we can use the operation decrement statement:i=10;
do --i; while ( i > 0);
do {
i++;
if (i==5)
break;
} while ( i <10);
Java
Even one example in what situations we can use the operation decrement statement:do --i; while ( i > 0);
j--;
Java
Other pieces of example codes:if ( x == 5 ) --y;
while ( y >= 0 ) --y;
--
Description
var -- ;
Input
- var - value receiver
Examples
Java
Even one example in what situations we can use the operation decrement statement:i=10;
do --i; while ( i > 0);
do {
i++;
if (i==5)
break;
} while ( i <10);
Java
Even one example in what situations we can use the operation decrement statement:do --i; while ( i > 0);
j--;
Java
Other pieces of example codes:y--;
i--;
Decrement statement in another programming language:
Differences to: