String str = "0023";
        NumberFormat nf = new DecimalFormat("0000");
        int value = Integer.valueOf(str).intValue() +1;
        System.out.println(nf.format(value));

解决方案 »

  1.   

    不知楼主何意:
    是这个吗?class Test
    {
    public String change(String num)
    {
    int newnum = Integer.parseInt(num);
    newnum++;
    return "000"+newnum;


    public static void main(String args[])
    {
    System.out.println (change("00023"));
    }

    }
      

  2.   

    哦,上面的有点问题,main中不能直接调用。public static String change(String num)
      

  3.   

    谢谢各位,尤其是 maowu(猫呜) 兄弟!!!问题解决,结贴!!!