0
What is the Difference between x=y and x==y
????????
3 Answers
+ 6
= is the assignment operator.
x = y means that the value of y is being assigned to x.
== is the comparison operator.
x == y checks whether x is equal to y or not.
+ 1
one changes x's value to y and second one returns true or false depending on is x equal to y or not
0
== a signal for show a equal value.
Example : x =5 y = 5
In this case,x is equal to y.
x == y
However,if x = 5 and y = 6
The result will be x = 6