Ask Question

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

+1
Answers (1)
  1. 20 May, 20:54
    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?
Find an answer to your question 👍 “What is the symbol that causes the computer to perform string concatenation? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers