The . . . . . . . . is used to concat to Strings.

[amp_mcq option1=”Concatenation operator” option2=”#NAME?” option3=”Concat function” option4=”Cat function” correct=”option1″]

The correct answer is: A. Concatenation operator.

The concatenation operator is used to concatenate two or more strings. It is a plus sign (+). For example, the following code will concatenate the strings “Hello” and “World”:

String str1 = "Hello";
String str2 = "World";
String str3 = str1 + str2;

The result of the code will be the string “HelloWorld”.

The other options are incorrect. Option B, the + symbol, is the concatenation operator. Option C, the Concat function, is not a valid function in most programming languages. Option D, the Cat function, is a valid function in some programming languages, but it is not as common as the concatenation operator.

Exit mobile version