Java concat () method
concat () method is used to specify the parameters of the connection string to the string.
grammar
public String concat(String s)
parameter
s - to connect strings.
return value
Returns the new concatenated string.
Examples
public class Test { public static void main(String args[]) { String s = "本教程:"; s = s.concat("www.w3big.com"); System.out.println(s); } }
The above program execution results:
本教程:www.w3big.com