- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# What are the arithmetic operators in Java?

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 –

Operator | Description | Example |

+ (Addition) | Adds values on either side of the operator. | A + B will give 30 |

- (Subtraction) | Subtracts right-hand operand from left-hand operand. | A - B will give -10 |

* (Multiplication) | Multiplies values on either side of the operator. | A * B will give 200 |

/ (Division) | Divides left-hand operand by right-hand operator. | B / A will give 2 |

% (Modulus) | Divides left-hand operand by right-hand operand and returns the remainder. | B % A will give 0 |

++ (Increment) | Increases the value of operand by 1. | B++ gives 21 |

-- (Decrement) | Decreases the value of operand by 1. | B-- gives 19 |

- Related Questions & Answers
- What are Arithmetic Operators in JavaScript?
- What are arithmetic operators in C#?
- Java arithmetic operators
- What are different arithmetic operators in Python?
- What are the arithmetic and character operators in DBMS?
- What is operand of arithmetic operators in Java
- Perl Arithmetic Operators
- Python Arithmetic Operators
- Arithmetic Operators in C++
- What are the unary operators in Java?
- What are the logical operators in Java?
- What are the bitwise operators in Java?
- What are the relational operators in Java?
- What are the assignment operators in Java?
- What are the ternary operators in Java?

Advertisements