concat() - String Methods in Java


This article is a part of String Methods in Java.
This method concatenates the specified string to the end of the given string. The parameter passed in this method is of String type.


Return type

The return type for concat() method is string. Let us look at an example for this method.

Example


Output

Let us look at the output of the above example code.

String Methods concat()
Fig.1- String Method - concat()

Here the string “Learning” concatenates with the string “Journal” to produce the resultant string “LearningJournal.”

Read More

Author : Satyam Kumar -



You will also like: