此方法将一个字符串附加到另一个字符串的末尾。
public String concat(String s)
这是参数的详细信息-
s - 被连结到该字符串的结尾字符串
此方法返回一个字符串。
public class Test { public static void main(String args[]) { String s="Strings are immutable"; s=s.concat(" all the time"); System.out.println(s); } }
这将产生以下输出-
Strings are immutable all the time
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Python实战 · 从0到1搭建直播视频平台 -〔Barry〕