The symbols used in a Java expression are known as

The operators are also classified on the basis of their types of operation :

The operators ++ and -- are the two shortcut arithmetic operators. They are used as follows :

1. x++ stands for x=x+1.

2. x-- stands for x=x-1.

They have two versions :

The table given below shows these operators :

int a=10;

float b=99.99;

**Operators,**whereas the values on which the operations are performed are known as**Operands.**There are three types of operators :**1. Unary Operator**:**These are the operators which require only one operand to perform the operation.****2. Binary Operator :**These are the operators which require two operands to perform the operation.**3. Tertiary Operator :**These are the operators which require three operands to perform the operation.The operators are also classified on the basis of their types of operation :

**1. Arithmetical Operators****2. Relational Operators****3. Logical Operators****4. Bitwise Operators****5. Assignment Operator****6. Compound Assignment Operator (Short Hand Operator)**

**These operators are required for arithmetical calculations. They are of two types :****1. Arithmetical Operators**:

**1. Binary Operators :**The table given below lists all binary form arithmetical operators in Java :Operator | Description | Function | Example |

+ | Plus | Adds the operands | a+b |

- | Minus | Subtracts the operands | a-b |

* | Multiply | Multiplies the operands | a*b |

/ | Divide | Divides the operands | a/b |

% | Modulus (Remainder) | Finds the remainder when one number is divided by the other | a%b |

**2. Unary Operators :**Operators + and - have a unary form too, in addition to binary forms. They are illustrated along with their functions in the table given below :Operator | Description | Example |

+ | Promotes a to int if it’s a byte, short, or char | +a |

- | Arithmetically negates a | -a |

The operators ++ and -- are the two shortcut arithmetic operators. They are used as follows :

1. x++ stands for x=x+1.

2. x-- stands for x=x-1.

They have two versions :

**1. The Prefix version :**Increments/decrements the value of the operand by 1 before doing the operation with it.**1. The Postfix version :**Increments/decrements the value of the operand by 1 after doing the operation with it.The table given below shows these operators :

Operator | Description | Example |

++ | Increments a by 1 after performing the operation with it | a++ |

++ | Increments a by 1 before performing the operation with it | ++a |

-- | Decrements a by 1 after performing the operation with it | a-- |

-- | Decrements a by 1 before performing the operation with it | --a |

**2. Relational Operators :**The relational operators in Java are used to compare the values of two operands a and b and results in the outcome of a boolean value. These are given in the table below :Operator | Description | Example |

> | Greater than | a>b |

< | Less than | a<b |

>= | Greater then equal to | a>=b |

<= | Less than equal to | a<=b |

= = | Equal to | a= =b |

!= | Not equal to | a!=b |

**3. Logical Operators :**These operators in Java are used to return a boolean value from an expression containing two or more comparisons. Java supports six logical operators, out of which five are binary and one is unary. The table belows shows these operators :

Operator | Description | Example |

&& | Short-circuit or conditional AND | a&&b |

|| | Short-circuit or conditional OR | a||b |

! | Logical NOT | !a |

& | Logical AND | a&b |

| | Logical OR | a|b |

^ | Logical XOR (exclusive OR) | a^b |

**5. Assignment Operator :**The assignment operator = is used to assign value to a variable or to initialize them. For example :int a=10;

float b=99.99;

**6. Compound Assignment Operator (Short Hand Operator) :**These operators are just like a shortcut assignment operator. They are given in the table below :Compound Assignment Operator | Arithmetic Operator |

a+=b | a=a+b |

a-=b | a=a-b |

a*=b | a=a*b |

a/=b | a=a/b |

It is really a great work and the way in which u r sharing the knowledge is excellent.Thanks for helping me to understand basic concepts. As a beginner in java programming your post help me a lot.Thanks for your informative article.java training in chennai | chennai's no.1 java training in chennai

ReplyDeleteperfect explanation about java programming .its very useful.thanks for your valuable information.java training in chennai | java training in velachery

ReplyDeleteI simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.

ReplyDeleteClick here:

angularjs training in btm

angularjs training in rajajinagar |angularjs training in marathahalli

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

ReplyDeleteClick here:

Microsoft azure training in velarchery

Click here:

Microsoft azure training in sollinganallur

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

ReplyDeleteBlueprism training in annanagar

Blueprism training in velachery

Blueprism training in marathahalli

AWS Training in chennai

AWS Training in bangalore

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.

ReplyDeleteDevops training in sholinganallur

A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.

ReplyDeleterpa training in electronic-city | rpa training in btm | rpa training in marathahalli | rpa training in pune

I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favourites blog site list and will be checking back soon.

ReplyDeleteData Science Training in Chennai | Data Science training in anna nagar

Data Science training in chennai | Data science training in Bangalore

Data Science training in marathahalli | Data Science training in btm

Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.

ReplyDeletejava training in tambaram | java training in velachery

java training in omr | oracle training in chennai

ReplyDeleteWhoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

Selenium Interview Questions and Answers

Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

Selenium Training in Bangalore | Best Selenium Training in Bangalore