KnowledgeBoat Logo

Computer Applications

State the difference between = and ==

Java Operators

54 Likes

Answer

===
It is the assignment operator used for assigning a value to a variable.It is the equality operator used to check if a variable is equal to another variable or literal.
E.g. int a = 10; assigns 10 to variable a.E.g. if (a == 10) checks if variable a is equal to 10 or not.

Answered By

35 Likes


Related Questions