📜  java代码示例中如何在字符串前添加空格

📅  最后修改于: 2022-03-11 14:52:37.088000             🧑  作者: Mango

代码示例1
String s = "%s Hellow World!";
    StringBuilder builder = new StringBuilder();
    for(int i=0;i<10;i++){
        builder.append(" ");
    }

    System.out.println(s.format(s,builder.toString()));