The String class method to join two strings is:
concat(String)
Reason — concat() method is used to join two strings. Its syntax is as follows:
String1.concat(String2)