输入结果 00000000000567
   
String bala="567";
   
固定长度是14位,怎么循环在bala前面填充00000000000
System.out.println("---www.yq1012.com--------");
String bala = "567";
        StringBuffer sb = new StringBuffer(17);
        sb.append(bala);
        while (sb.length() < 17) {
            sb.insert(0, 0);
        }
        System.out.println(sb.toString());

 

相关文章:

  • 2021-05-17
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2021-07-02
  • 2021-10-26
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
相关资源
相似解决方案