DecimalFormat decimalFormat=new DecimalFormat("000");// 字符串数字的位数 String code="aaa001"; // 字符串 String codenew=code.substring(3, code.length()); // 截取字符中的数字 int i=Integer.parseInt(codenew)+1; String k=decimalFormat.format(i); System.out.println(k);
DecimalFormat decimalFormat=new DecimalFormat("000");// 字符串数字的位数 String code="aaa001"; // 字符串 String codenew=code.substring(3, code.length()); // 截取字符中的数字 int i=Integer.parseInt(codenew)+1; String k=decimalFormat.format(i); System.out.println(k);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。