• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

How to Concatenate Strings ?

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.
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.