How to Concatenate Strings ?

Discussion in 'Strings, I/O, Formatting, Parsing' started by vbraojava, Oct 20, 2008.

  1. vbraojava

    vbraojava New Member

    The String class includes a method for concatenating two Strings :

    string1.concat(string2) : This returns a new string that is string1 with string2 added to it at the end.

    - We can also use the concat() method with String literals, as in :

    "My name is ".concat("Rumplestiltskin");

    - Strings are more commonly concatenated with the + operator, as in :

    Example : "Hello," + " world" + "!"

    which results in "Hello, world!"

    - The + operator is widely used in print statements.

    Example : String string1 = "saw I was ";
    System.out.println("Dot " + string1 + "Tod");

    - which prints Dot saw I was Tod

    Note : Such a concatenation can be a mixture of any Objects. For each Object that is not a String, its toString() method is called to convert it to a String.
     
  2. anneroberts

    anneroberts Member

    Select An Mobile the place you need to enter the recipe.
    Sort =CONCATENATE( in that cell or in the recipe bar.
    Press Also hold Ctrl What's more click for each cell you need to link.
    Arrival those Ctrl button, sort the shutting bracket in the equation bar What's more press enter.
     

Share This Page