目录
方式一:String.format
String.format("select %s,%s from table where %s=xxx and %s=xxx;" id, name, id, name)
方式二:MessageFormat.format
import java.text.MessageFormat;
String sql = MessageFormat.format("select {0},{1} from table where {0}=xxx and {1}=xxx", id, name)