JavaFX supports the standard operators. The operators are
Operator
|
Symbol
|
Usage
|
| Assignment |
=
| var num = 1; |
| Addition |
+
| var result 1+2; |
| Subtraction |
-
| var result = 4-3; |
| Multiplication |
*
| var result = 4*num; |
| Division |
/
| var result num1/num2; |
| Negation |
-
| result = -result; //Negates the number |
| Increment |
++
| result++; |
| Decrement | result; | |
| not |
not
| Inverts boolean. if(not success){} |
| equality |
==
| if(a == b){} |
| Not Equal |
!=
| if(a != b){} |
| Greater than |
>
| if(a > b){} |
| Greater than or equal to |
>=
| if(a >= b){} |
| Less than |
<
| if(a < b){} |
| Less than or equal to |
<=
| if(a <= b){} |
| Conditional and |
and
| if ((a<1) and (b<1)){} |
| Conditional or |
or
| if ((a<1) or (b<1)){} |
| Type Comparison |
instanceof
| if(num instanceof Integer){} |
No comments:
Post a Comment