+ 2

What is operator

14th Jun 2018, 2:15 PM
anu
anu - avatar
4 Respuestas
+ 2
The assignment operator (=) is the most commonly used binary operator in Java. It evaluates the operand on the tight hand side and then assigns the resulting value to a variable on the left hand side. The right operand can be a variable, constant, function call or expression. The type of right operand must be type compatible with the left operand. The general form of representing assignment operator is                        Variable = expression/constant/function call                        a = 3; //constant                        x = y + 10; //expression In the first case, a literal value 3 is stored in the memory location allocated to variable a. In the second case, the value of expression y+ 10is evaluated and then stored in memory allocated to variable x. Consider a statement x = y = z = 3; Such type of assignment statement in which a single value is given to a number of variables is called multiple assignment statement i.e. value 3 is assigned to the variables x, y and z. The assignment operator
14th Jun 2018, 2:25 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 1
anu .. Operators are the symbols that are used to perform operations on operands. For example: +, -, *, / etc. There are many types of operators in java : Arithmetic Operator(+, -, *, /, %) shift Operator(<<, >>, etc.) Relational Operator(==, <=, etc) Bitwise Operator(&, ^, etc) Logical Operator(&&, ||, etc) Assignment Operators(=, >=, <=, /=, etc) Increment /decrement operators(++, - -).
18th Jun 2018, 4:46 PM
Ashi Soni
Ashi Soni - avatar
+ 1
nice ashu
19th Jun 2018, 7:10 AM
Kunal Patil
Kunal Patil - avatar