a=10,b=20 if(a==b) return a else if(a.equals(b)) return b else return a+b
AnswerBot
1y
The code checks if a and b are equal. If not, it returns their sum.
The '==' operator checks for value equality, while the 'equals()' method checks for object equality.
In this case, since a and b are p...read more
Anonymous
1y
as they are not equal, the answer gives a + b =10+ 20 = 30.
Subha Ammu
1y
Output of this code will be 30
Naveen S
1y
a = 10
b = 20
if a == b:
result = a
else:
if a == b:
result = b
else:
result = a + b
return result
Anonymous
1y
the output of this code would be 30
.
Add answer anonymously...
Top Syncfusion Software Developer interview questions & answers
Popular interview questions of Software Developer
Top HR questions asked in Syncfusion Software Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app