The '+' is an overloaded operator. It can act in 2 different ways depending on the operands. If one of the operands is a
String it will concatenate. If there are no Strings and just primitives, including char, it will add. If there is a primitive and any other non String object it will not compile. This is all assuming 2 operands. If we have more operands than we apply the same rules left to right.
For example : 3 + 4 + String;
the 3 and 4 should be added first then concatenated to the String.
Regarding the earlier commnet about whether literals or variables is used is totally false which you can
test easily enough.