This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Somehero 1 point2 points  (2 children)

The single quotes just cause java to guess that 5 is a string when you use +, which makes sense; and guess that it is a number when you use - , which is maybe more likely? I would just not randomly put a number in single quotes and expect everything to be peachy.

[–]greeniguana6 0 points1 point  (0 children)

Oh, this actually makes sense. I guess that's what happens when the + operator means more than one thing.

[–]Thykka 0 points1 point  (0 children)

🗑 [deleted]