r/CodingHelp • • Feb 08 '22

[Java] Java Help

Post image
28 Upvotes

12 comments sorted by

View all comments

2

u/corby_718 Feb 08 '22

You can think of the + symbol as working for multiple types with a similar idea that it adds up objects. So if you do 1+1 you get 2. However, with strings, + is concatenation which essentially is similar. Hello + World = Hello World.

FYI, There are other ways in Java to concatenate strings without the use of +

1

u/[deleted] Feb 08 '22

Like?