Computer Science, asked by akshayakz10117, 8 months ago

Write the difference between = and = = operators with suitable example.​

Answers

Answered by WhiteDove
5

Explanation:

both are not same, = is an Assignment Operator it is used to assign the value of variable or expression, while == is an Equal to Operator and it is a relation operator used for comparison (to compare value of both left and right side operands).

Answered by harshabhigale420
0

Answer:

= is assigning operator ....in Java programming language while == is relational operator....

= is used to assign values to variable while == is used for comparison between two variables ....

for example

int x = 10; where 10 is stored in variable x ....

but

int x=1;

if(x==10)

x=0;

else

x=2;

..this is comparison and giving result accordingly

Similar questions