Ask Question
27 October, 18:36

What is the symbol that causes the computer to perform string concatenation?

+1
Answers (1)
  1. 27 October, 22:00
    0
    Answer: In java the symbol "+" operator is used to perform string concatenation.

    Explanation:

    String concatenation refers to joining of two strings. So in java + is used to join strings which works provided one of the operands must be a String variable. Then it works by converting the other variable to String variable and joins the second operand to the end of the first operand.

    An example of String concatenation is as follows:

    int age = 10;

    System. out. println ("The boys age is " + age);

    Output:

    The boys age is 10.

    here, the age is integer variable but as the phrase "The boys age is" is a String variable so it converts the age to String variable and joins both the Strings.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is the symbol that causes the computer to perform string concatenation? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers