Java String concatThe java string concat() method combines specified string at the end of this string. It returns combined string. It is like appending another string. Internal implementationSignatureThe signature of string concat() method is given below: ParameteranotherString : another string i.e. to be combined at the end of this string. Returnscombined string Java String concat() method examplejava string java string is immutable so assign it explicitly Java String concat() Method Example 2Let's see an example where we are concatenating multiple string objects. Output: HelloJavatpoint HelloJavatpointReader Java String concat() Method Example 3Let's see an example where we are concatenating spaces and special chars to the string object. Output: Hello Javatpoint Reader Hello!!! Hello@Javatpoint Next TopicJava String contains()
|