0
What's the difference betwen = and ==?
2 Answers
+ 4
= is used for assigning value
== is used to check if 2 values are equal or not
+ 2
= is used to assign some values where as == is used to compare two values
e.g. int a=5; means a is assigned 5
if ( a==5 ) means we are checking if a is equal
to 5 or not and it only returns a true or false
value