String concat() method in java with example:
concat() method is present in the java.lang.String class. concat() method concatenate the given string at a time. This method concatenates the specified string to the end of this string and returns a new string with the new value. This mehtod can be used to concatenate multiple strings one by one. This method can be called multiple times on the string.Syntax:
public String concat(String str)
Return value: String
A string that represents the concatenation of this object's characters followed by the string argument's characters.
In Java 8, a new method join() is introduced. String join() method example to concatenate the given string with a delimiter.