0

What's the difference betwen = and ==?

29th Aug 2016, 9:51 AM
Guilherme
2 Answers
+ 4
= is used for assigning value == is used to check if 2 values are equal or not
31st Aug 2016, 4:34 AM
Shark riding Astronaut
Shark riding Astronaut - avatar
+ 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
26th Sep 2016, 5:36 PM
Harishiv Singh
Harishiv Singh - avatar