您可以使用concat()方法连接两个字符串。
concat()
public class ConcatinatedStrings { public static void main(String args[]) { String str1 = new String("nhooo"); String str2 = new String(".com"); String res = str1.concat(str2); System.out.println(res); } }
输出结果
nhooo.com
友情链接: json在线解析 通晓查询 糯晒黄历 姓名打分