Skip to main content
Updated date:

# What is MDAS? Sample Java Source Code for MDAS

## Get A Website Plus a Free Domain Name in Just 1 Hour!

Bring the new technology in your hands! Share your skills, improve and impress. Get Your Own Website and a Free Domain Name Here!

What is MDAS?

MDAS stands for Multiplication, Division, Addition and Subtraction. MDAS is a standard ordering of operations or a standard precedence of operation in Mathematics and modern computing application on what to execute first if the numbers are not enclosed in parenthesis.

For example, if we will solve,

6 + 4 * 3

The answer without MDAS rule should be

6 + 4 = 10 * 3 = 30

but with MDAS rule, the answer would be different. Because it gives priority to multiplication first, followed by division, then the addition and last to execute is the subtraction. With MDAS the answer to

6 + 4 * 3

is this:

4 * 3 = 12 + 6 = 18

See the huge difference between the answer with and without the MDAS rule? Similarly, MDAS is also introduced in computer programming. Since, MDAS would be helpful for those who are learning Java Programming, here is the sample code for MDAS in Java.

What does MDAS Program Offers?

1. Learning more on Looping

2. Learning more on the use of array.

3. Learning how to execute basic arithmetic operations in Java programming.

## Sample Output:

If this hub is helpful to you, please rate and share it. Happy Programming!