format方法
String s="你好'%s'我在东五环'%s'"; s= s.format(s, "北京","望京"); System.out.println(s);
打印结果:
你好'北京'我在东五环'望京'