Java Programming – Arithmetic Operators and Operator Precedence

I am continuing on with my video series on Java programming for beginners. In this video, I introduce the arithmetic operators and explain in detail how to use them, with many examples. I also discuss and illustrate the importance of operator precedence and provide a detailed example of a common error trap that beginner programmers tend to make.

The arithmetic operators are provided by the Java programming language to facilitate the familiar mathematical operations of addition, subtraction, multiplication and division.  There is also another operator called the modulus operator (represented using the percent symbol %).  The modulus operator is used to obtain the remainder when two integers are divided by each other.  For example, when 3 is divide by 2 i.e.: (3 / 2), then the reminder is 1.  That is too say, 2 divides into 3 one time with 1 over.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s