public static void main(String[] args) { System.out.println("0123456789"+"|"); System.out.println(String.format("%1$-10s", "ds df")+"|"); }
左对齐,右补空格
猜你喜欢
转载自see-you-again.iteye.com/blog/2237884
今日推荐
周排行