Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Jdk7 Operators in java 7

Related Tutorials


 
 

Share on Google+Share on Google+

Operators in java 7

Advertisement
This tutorial describes the concept of operators in java 7.

Operators in java 7

This tutorial describes the concept of operators in java 7.

Operators :

For doing different kind of manipulation we need operators. Java provides many operators. In general you can say operators are a special symbol that do specific operations on one or more operands and after manipulation returns some result.

You can divide operators in the following list -

  • Arithmetic Operators
  • Unary Operators
  • Relational Operators
  • Bitwise Operators
  • Logical Operators
  • Assignment Operators
  • Misc Operators

Precedence Order of Java Operators -

When we apply more than one operators in our expression then expression executed according to the highest precedence operator. That means the operator run first according to the higher precedence order. All the expression is evaluated according to the precedence order of operators. The higher order performed first than the other and in the same way other operators are executed.

Operators Precedence Association
postfix expr++ expr-- Left to right
unary ++expr --expr +expr -expr ~ ! Right to left
multiplicative * / % Left to right
additive + - Left to right
shift << >> >>> Left to right
relational < > <= >= instanceof Left to right
equality == != Left to right
bitwise AND & Left to right
bitwise exclusive OR ^ Left to right
bitwise inclusive OR | Left to right
logical AND && Left to right
logical OR || Left to right
ternary ? : Right to left
assignment = += -= *= /= %= &= ^= |= <<= >>= >>>= Right to left
Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 19, 2012

Related Tutorials

Discuss: Operators in java 7  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com