Operator | Description | Example |
---|---|---|
+ | Adds two operands | A + B gives 30 |
- | Subtracts second operand from the first | A - B gives -10 |
* | Multiplies both operands | A * B gives 200 |
/ | Divides the numerator by the denominator | B / A gives 2 |
% | Modulus operator; gives the remainder after an integer division. | B % A gives 0 |
++ | Increment operator. It increases the integer value by one. | A++ gives 11 |
-- | Decrement operator. It decreases the integer value by one. | A-- gives 9 |
Operator | Description | Example |
---|---|---|
== | It checks assuming that the upsides of two operands are equivalent or not; if indeed, the condition turns out to be valid. | (A == B> is not true. |
!= | It checks assuming the upsides of two operands are equivalent or not; in the event that the qualities are not equivalent, then, at that point, the condition turns out to be valid. | (A != B> is true. |
> | It checks assuming the worth of left operand is more noteworthy than the worth of right operand; if indeed, the condition turns out to be valid. | (A > B> is not true. |
< | It checks in the event that the worth of left operand is not exactly the worth of the right operand; if indeed, the condition turns out to be valid. | (A < B> is true. |
>= | It checks in the event that the worth of the left operand is more noteworthy than or equivalent to the worth of the right operand; if indeed, the condition turns out to be valid. | (A >= B> is not true. |
<= | It checks assuming the worth of left operand is not exactly or equivalent to the worth of right operand; if indeed, the condition turns out to be valid. | (A <= B> is true. |
Operator | Description | Example |
---|---|---|
&& | Called Logical AND administrator. In the event that both the operands are non-zero, condition turns out to be valid. | (A && B> is false. |
|| | Called Logical OR Operator. If any of the two operands is non-zero, then condition becomes true. | (A || B> is true. |
! | Called Logical NOT Operator. Use to inverts the sensible condition of its operand. On the off chance that a condition is valid then Logical NOT administrator will make misleading. | !(A && B> is true. |