0% found this document useful (0 votes)
6 views19 pages

Lesson 3-4

Programming is the mental process of thinking up instructions to give to a machine (like a computer). Coding is the process of transforming those ideas into a written language that a computer can understand.

Uploaded by

Sk Burgos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views19 pages

Lesson 3-4

Programming is the mental process of thinking up instructions to give to a machine (like a computer). Coding is the process of transforming those ideas into a written language that a computer can understand.

Uploaded by

Sk Burgos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

BASIC OPERATOR

CHAPTER 6
Basic Operators
Java provides a rich set of operators to manipulate variables.
We can divide all the Java operators into the following groups:

• Arithmetic Operators
• Relational Operators
• Bitwise Operators
• Logical Operators
• Assignment Operators
• Misc Operators
The Arithmetic Operators:

Arithmetic operators are used in mathematical


expressions in the same way that they are used in
algebra.
The following table lists the arithmetic operators: Assume integer
variable A holds 10 and variable B holds 20, then:
EXAMPLE OF ARITHMITIC
OPERATION IN
JAVA USING NETBEAN
The Relational Operators:
There are following relational operators supported by Java language: Assume variable A holds 10 and variable B holds 20,
then:
EXAMPLE OF RELATIONAL IN
JAVA USING NETBEAN
The Bitwise Operators:
Java defines several bitwise operators, which can be
applied to the integer types, long, int, short, char, and
byte. Bitwise operator works on bits and performs bit-
by-bit operation.
The following table lists the bitwise operators:
0 0 0 0 1 1 0 0

EXAMPLE OF BITWISE OPERATION IN


JAVA USING NETBEAN
EXAMPLE OF LOGICAL OPERATOR IN
JAVA USING NETBEAN
EXAMPLE OF ASSINGMENT
OPERATOR IN
JAVA USING NETBEAN

You might also like