answersLogoWhite

0


Best Answer

The decrement operator is simply the double minus, attached to a variable:a--;

or:

--a;

The two examples above are identical, and both are equivalent to:

a -= 1;

or:

a = a - 1;

However, if the decrement operator is used as part of more complicated expressions, in the --variable version, the decrement is done before anything else, while in the variable-- version, the decrement is done after anything else.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Decrement operators programing in java
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the examples of programing language?

c, c++, java, prolog, fortran, basic, ...


What are the different types of Operators available in java?

arithmatic operator +,-,*,/,% assigment oprator == logical operator &,|,^,&&,,! bitwise opertor &,|,^ left shift << right shift >> left shift zero fill << assignment operator +=,-=,*=,/=


How many operators are there in C Language?

There are several operators in the C programming language, which are used to perform various operations on variables and values. Here is a list of some of the most commonly used operators in C: Arithmetic operators: +, -, *, /, % (addition, subtraction, multiplication, division, modulus) Assignment operators: =, +=, -=, *=, /=, %=, &=, |=, ^=, = Comparison operators: ==, !=, , = (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Logical operators: && (AND), || (OR), ! (NOT) Bitwise operators: &, |, ^ (AND, OR, XOR) Increment and decrement operators: ++ (increment), -- (decrement) Conditional operator: ?: (ternary operator) It's important to note that there may be some additional operators depending on the specific C compiler or implementation being used.


What are unary operators in javascript?

Binary operators are the common ones like +, -, /, *, <, >, !=, etc.. These you use with two objects, like : 1 + 2 Unary are the ones that does not need another object, like : ++, +, --, -, ! Like var a = 5; // Not this. this is a assignment a++; //Increment a in one ++a; //Increment a in one a--; // Decrement a in one --a; // Decrement a in one !a; // Logical opposite of a +a; // Positive value of a -a; // Negative value of a


Rewrite the BNF of Example 3.4 to add the and -- unary operators of Java?

123

Related questions

What is a 'post fix expression' in java programming?

Postfix expressions are expressions where the operator is at the end of the expression. These include the "++" (increment) and "--" (decrement) operators. Most Java expressions use in-fix notation (e.g. "a + b") but the increment and decrement operators can be postfix ("e.g. "a++" to increment variable a) or even prefix (e.g. "++a").


What is difference java and visual basic programming?

java is a server side programing where as visual basic is a client side programing(This programing Language is different from oops)


What are the eight java operator?

The different types of operators in Java are:Assignment OperatorsRelational OperatorsArithmetic OperatorsLogical Operators


Is there a java virtual machine for android?

yes its a programing tool.


Who develop java programming?

Java programing language was designed by James Gosling and it was initially called as "Oak" but later it was renamed to "Java" in the year 1995.


What are the examples of programing language?

c, c++, java, prolog, fortran, basic, ...


What are the different types of Operators available in java?

arithmatic operator +,-,*,/,% assigment oprator == logical operator &,|,^,&&,,! bitwise opertor &,|,^ left shift << right shift >> left shift zero fill << assignment operator +=,-=,*=,/=


What was used to invent the game Minecraft by Markus Persson?

The programing language named Java.


What is meant by a Java Long Datatype?

The Java Long Datatype is a 64 bit data language, this format of Java is important to be skilled in for anyone that are to be doing C++ programing language.


What is the best programing language?

C is best. But java is widely used and relatively easier language


What are the different types of operations of c?

c have different types of operations are there these are 1:logical operators 2:conditional 3:arithmetic 4:bit wise operators 5:increment&decrement 6:relational operators 7:assignment operators 8:special operators we can use above operators. we can implementing the operations. suppose logical operators &&,,! by using these we can implement operations


How many operators are there in C Language?

There are several operators in the C programming language, which are used to perform various operations on variables and values. Here is a list of some of the most commonly used operators in C: Arithmetic operators: +, -, *, /, % (addition, subtraction, multiplication, division, modulus) Assignment operators: =, +=, -=, *=, /=, %=, &=, |=, ^=, = Comparison operators: ==, !=, , = (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Logical operators: && (AND), || (OR), ! (NOT) Bitwise operators: &, |, ^ (AND, OR, XOR) Increment and decrement operators: ++ (increment), -- (decrement) Conditional operator: ?: (ternary operator) It's important to note that there may be some additional operators depending on the specific C compiler or implementation being used.