Thursday, March 23, 2017

Additive Operator +

Hi All,

Let's talk about Additive Operator in Java, Symbole of the Additive Operator is "+". As usual Additive Operator act same as in Mathematics. In addition to that in Java we use Additive Operator to String Concatenation. Let's take a look at use of Additive Operator.

Addition

int a = 10;
int b = 20;
int c = a + b;

Now value of c is 30.



According to Operator evaluation from left to right and right to left, at the first place a adding to b and the result value in this case 30 assigning to c.

In my next post I will talk about String Concatenation using Additive Operator

No comments:

Post a Comment