1.Arithmetic operators
Operator operation
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
2.Assignment operators
operator Example Discription
= x=10; set x to 10.
+= x+=10; x=x+10;
-= x-=10; x=x-10;
*= x*=10; x=x*10;
%= x%=10; x=x%10;
/= x/=10; x=x/10;
3.Relational Operators
operator How to use
== x==a;
<= x<=a;
>= x>=a;
< x<a;
> x>a;
!= x!=a; means x does not equal to a;
4.Logical operators
operator How to use discription
&& (a>1)&&(a<5) a is greater than 1 and less than 5.
|| (a>1)||(a<5) a is graeter than 1 or less than 5;