详情请点击:https://www.jb51.net/article/159238.htm
package Helloword;
public class Helloword {
public static void main(String[] args) {
// TODO Auto-generated method stub
String site = "www.runoob.com";
int len = site.length();
System.out.println("菜鸟教程网址长度:" + len);
String showtime = "你好!".concat("我是兵,你是贼!");
System.out.println(showtime);
String dialogue1 = "我想做个好人!";
System.out.println(dialogue1);
String dialogue2 = "对不起,我是警察!";
System.out.println(dialogue2);
System.out.printf("我%s哥出,"+"比%d万多一百块,"+"%d万零%.2f","乌鸦",18,18,100.526);
String dialogue3 = new String();
dialogue3 = "妈的,你是来砸场子的?"+"大飞".format("你出多少,我都多你%d块!",1);
System.out.println('\n'+dialogue3);
}
}
在这里致敬《蛊惑仔3:只手遮天》!