Operators in Java

Operators in Java
Spread the love

Operators in Java:

An operator takes one or more arguments and produces a new value. The arguments are in little different from ordinary method calls but result in the same. All operators produce value from their operand. An operator can change the value of an operand. This is called a side effect. The most common use for operators that modify their operand is to generate the side effect. But the value produced is available for our use as in operators without side effects.

In general, operations mainly classified into two categories:

  1. Transitive
  2. Non-Transitive

When x(operator)y(operator)z=z(operator)y(operator)x then the operation is transitive operation. Otherwise, it is a non-transitive operation.

//for x=2,y=4,z=8 and operator=+ then 
//is equal to
//hence it is a transitive operation.
//in case operator1 =+ and operator2=-
//is not equal to
//hence it is non transitive operation.

There are the below types of operators available in java

  1. Arithmetic operator
  2. Concatenation operator
  3. Assignment operator
  4. Unary operator
  5. Relational operator
  6. Ternary operator
  7. Conditional operator
  8. Type comparison operator
  9. Bitwise operator
  10. Shift operator
  11. Other Operator
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1

1 thought on “Operators in Java”

  1. It’s a pity you don’t have a donate button! I’d definitely donate to this brilliant blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to new updates and will talk about this website with my Facebook group. Chat soon!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top