Java String concat() method is used to add the given String to the end of the current String.

Syntax:

Parameter:

Str: String to be concatenated at the end of current string.

Returns:

It returns Combined String.

Example 1: Concatenating Strings one by one

Output:

Example 2: Concatenating multiple Strings

Output:

Example 3: concatenating spaces and special characters to the string object

Output:

Pin It on Pinterest

Share This