摘要: System.out.println(String.format("%02d",x)); //x是你要输出的整数 这样1就输出01,前面自动补0, 11还是输du出11不变。 这里使用了zhiString.format()方法,作用就是格式化输出参数. “%02d”是指定输出格式,%作先导标记,0表 阅读全文
posted @ 2020-09-10 15:40 大酷仔 阅读(323) 评论(0) 推荐(0) 编辑