Java string align to right

前端 未结 1 488
情深已故
情深已故 2020-12-06 04:42

I have an array of these numbers

61672
8414449
264957

I use a DecimalFormat object like this

DecimalFormat fo         


        
相关标签:
1条回答
  • 2020-12-06 05:00

    You can wrap it into a String.format call like this:

    String.format("%15s", formatter.format(i))
    
    0 讨论(0)
提交回复
热议问题