Write the difference between = and = = operators with suitable example.
Answers
Answered by
5
Explanation:
both are not same, = is an Assignment Operator it is used to assign the value of variable or expression, while == is an Equal to Operator and it is a relation operator used for comparison (to compare value of both left and right side operands).
Answered by
0
Answer:
= is assigning operator ....in Java programming language while == is relational operator....
= is used to assign values to variable while == is used for comparison between two variables ....
for example
int x = 10; where 10 is stored in variable x ....
but
int x=1;
if(x==10)
x=0;
else
x=2;
..this is comparison and giving result accordingly
Similar questions
Social Sciences,
4 months ago
English,
4 months ago
Geography,
4 months ago
India Languages,
8 months ago
English,
8 months ago
Chemistry,
1 year ago
Computer Science,
1 year ago