Java – String concat() Method example

In this tutorial we will learn how to concatenate multiple strings using concat() method in Java.

public String concat(String str)

This method concatenates the string str at the end of the current string. For e.g. s1.concat("Hello"); would concatenate the String “Hello” at the end of the String s1. This method can be called multiple times in a single statement like this