Computer Applications
What is the difference between = and ==
Java Operators
ICSE 2011
51 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. |
Example:int a = 10;This statement assigns 10 to variable a. | Example:if (a == 10)This statement checks if variable a is equal to 10 or not. |
Answered By
29 Likes