Computer Science, asked by RAHULSEN504, 1 year ago

what is the difference between arithmetic expression and arithmetic operator in Java?

Answers

Answered by Rakshiknr
18
An Arithmetic Expression may contain variables, constants and Arithmetic operators together to produce a meaningful result.
ex x+y,m-5...
The operators ,which are applied to perform Arithmetic calculations in a program are known as Arithmetic operator.
If an Arithmetic Expression is assigned to a variable, it is known as Arithmetic Statement.
ex z=x+y

I hope it is correct.
Answered by kvnmurty
24
The question seems to be simple.

Arithmetic expression is formed by operands (variables, functions, constants) with arithmetic operators among them.

  An expression is a sequence of binary or unary or ternary operators along with their operands. The operator precedence tells us which operators are to be evaluated before the other operators. The result of an arithmetic expression is an integer, or floating point value or double floating point value.

   An expression does not have an L value. It has only R value.

        example:    a , 5, - 3, 3.02,  a + b / c - d % 10  
            (a b c d are variable names)

Arithmetic operators:  +, - , / , * % ^  etc.

    Arithmetic operators must have operands of type floating point, double or integer.  Operators are known in the language Java. The compiler recognizes them. Only known operators can be used in a program. An operator does not have an L value or R value.


kvnmurty: :-)
Rakshiknr: Sorry now I came to know that the meaning is smiling face☺
Similar questions