Site hosted by Angelfire.com: Build your free website today!
       
The Digital Reference Section

 

JAVA Operators
compiled by: Rodelio Barcenas

Java expressions involve compsing literals and variables with operators. The following are the list of operators needed in the topic JAVA Program Control

Arithmetic Operators
Increment Decrement Operators
Logical Operators
Unary Operators
Bitwise Operators


ARITHMETIC OPERATORS

The following are binary arithmetic operators:

+ addition
- subtraction
* multiplication
/ division
% modulo

INCREMENT and DECREMENT OPERATORS

++ increment
example; x++ (means x = x + 1)

-- decrement
example; x-- (means x = x - 1)

LOGICAL OPERATORS

Java allows for the standard comparison operators between numbers;

< less than
<= less than or equal to
== equal to
!= not equal to
>= greater than or equal to
> greater than

UNARY OPERATORS

<condition1> && <condition2>
&& conditional AND

<condition1> || <condition2>
|| conditional OR

! not prefix

BITWISE OPERATORS

~ bitwise COMPLEMENT
& bitwise AND
| bitwise OR
^ bitwise Exclusive-OR
<< shift bits left, filling in with zeros
>> shift bits right filling in with sign bit
>>> shift bits right, filling in with zeros


The PinoyTechZone.Com
Copyright 2002-2003
All rights Reserved