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.
Here the string “Learning” concatenates with the string “Journal” to produce the resultant string “LearningJournal.”