
Jonathan C. answered 02/13/22
Master's in Computer Science at the University of Pennsylvania
A single equals sign indicates assignment. For example,
will assign the value 3 to the variable x.
Meanwhile, a double equals sign indicates a conditional expression, or an expression that evaluates to a boolean value (true/false). So, if we've assigned 3 to the value x as above,
will evaluate to true. You can use the double equals sign in things like if statements:
(examples in Java)