如何做一個格式如下:的Java:一個列表字符串格式
從這:
1: My street
2: 1232321
3: Hello there world!
4: A really really really long word!
要這樣:
1: My street
2: 1232321
3: Hello there world!
4: A really really really long word!
我認爲這是與字符串.format()和一堆隨機字符在裏面!
你有什麼'String.format()'? –
我認爲這可能是一個重複或至少非常類似的問題[this](http://stackoverflow.com/questions/6640184/java-output-right-alignment)。看看那個。 –