0
print("5" + "3") Why was the output 53 ?
3 Answers
+ 21
As 5 written in double inverted commas("5"): Its a String....and as so 3, they are not the numbers but they are Strings, If you add an String to another string the output would be: "5" + "3" = 53
and in an int, double, float or long case:
5 + 3 = 8;
Remember when we add double inverted commas to anything, it becomes a Stringđ
+ 4
Putting " around something makes it a string. So it makes it a character with no numerical value. So "a" + "b" = ab
0
8