zoukankan      html  css  js  c++  java
  • Java 格式化数字

    int x = 1;
            while(x<100){
                
                DecimalFormat df = new DecimalFormat("000");
                String xs = df.format(x);
                System.out.println(xs);
                x++;
            }

    将 1 格式化为 001

  • 相关阅读:
    605
    603
    509
    7-5
    6-5
    5-6
    5-3
    5-4
    5-5
    4-12
  • 原文地址:https://www.cnblogs.com/lipeil/p/4847175.html
Copyright © 2011-2022 走看看