int 补零

来源:互联网 发布:js两个字符串比较 编辑:程序博客网 时间:2024/05/18 00:53
int i = 1;String str = new DecimalFormat("0000").format(i);//则str=“0001”;
原创粉丝点击