Advertisement
  • Add a Comment
  • Print
  • Share

Using Java Operators

Part of the Java All-in-One For Dummies Cheat Sheet

An operator designates a mathematical operation or some other type of operation that can be performed on operands. Java has arithmetic operators, relational operators (also known as binary operators) and logical operators (also known as boolean operators).

Arithmetic
+ Addition
- Subtraction
* Multiplication
/ Division
% Remainder
++ Increment
Decrement
+= Addition and assignment
-= Subtraction and assignment
*= Multiplication and assignment
/= Division and assignment
%= Remainder and assignment
Relational
== Equal
!= Not equal
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
Logical
! Not
& And
&& Conditional and
| Or
|| Conditional or
^ xor
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com