I like to confuse myself with syntactical things and not to concentrate on really doing stuff. :)
I know what I can do with this thing but I still want to know what is really happening under the hood.
So... I just wonder what are the reasons and situations where putting strings inside parentheses is meaningful. I saw a method that returned something like
return (string1 + " " + string2);
The parenthesis have no effect in this example. The code you posted is equivalent to this:
Generally speaking there is no specific interaction between parenthesis and
String
s or string literals. Parenthesis have the same semantics as in "normal" expressions: to group operations.In some cases parenthesis might be necessary to specify the correct interpretation: