- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- 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 is operand of arithmetic operators in Java

Operators are like + , - whereas operands are values on which operates.

The following program is a simple example which demonstrates the arithmetic operators. Copy and paste the following Java program in Test.java file, and compile and run this program −

## Example

public class Test { public static void main(String args[]) { int a = 10; int b = 20; int c = 25; int d = 25; System.out.println("a + b = " + (a + b) ); System.out.println("a - b = " + (a - b) ); System.out.println("a * b = " + (a * b) ); System.out.println("b / a = " + (b / a) ); System.out.println("b % a = " + (b % a) ); System.out.println("c % a = " + (c % a) ); System.out.println("a++ = " + (a++) ); System.out.println("b-- = " + (a--) ); // Check the difference in d++ and ++d System.out.println("d++ = " + (d++) ); System.out.println("++d = " + (++d) ); } }

This will produce the following result −

## Output

a + b = 30 a - b = -10 a * b = 200 b / a = 2 b % a = 0 c % a = 5 a++ = 10 b-- = 11 d++ = 25 ++d = 27

- Related Articles
- Java arithmetic operators
- What are the arithmetic operators in Java?
- What are arithmetic operators in C#?
- What are Arithmetic Operators in JavaScript?
- What are different arithmetic operators in Python?
- Arithmetic Operators in C++
- Perl Arithmetic Operators
- Python Arithmetic Operators
- Arithmetic operators in Dart Programming
- What are the arithmetic and character operators in DBMS?
- Explain the concept of Arithmetic operators in C language
- Simple Arithmetic Operators Example Program In C++
- Why in MySQL, we cannot use arithmetic operators like ‘=’, ‘
- Check if n is divisible by power of 2 without using arithmetic operators in Python
- What is the difference between >> and >>> operators in Java?

Advertisements