跳到主要內容

發表文章

目前顯示的是 2017的文章

Java String Format

java練習筆記 String Format延伸應用: fix position : left justified()           System.out.println(String.format("%-10s hello" , s1));           hello      java fix position : right justified()           System.out.println(String.format("%10s helllo" , s1));                hello java fill zero in front           String.format("%03d" ,  s1)           050