i didn't find the method "prt" 's definition!

解决方案 »

  1.   

    sorry, i find,but the JBuilder7 shows "Method prt(java.lang.String) not found in class hannuota at line X".
      

  2.   

    添加如下代码:
    public static void prt(String s))
    {
        System.out.println(s);
    }
      

  3.   

    为啥不用递归呢,看的我好晕。
    递归的程序:
    public class Hano
    {
      public static void resolve(int number,String left,String center,String right)
      {
        if(number>1)
        {
          resolve(number-1,left,right,center);
          System.out.println(left+"->"+right);
          resolve(number-1,center,left,right);
        }
        else
        {
          System.out.println(left+"->"+right);
        }
      }
      public static void main(String[] args)
      {
        Hano.resolve(3,"1","2","3");
      }
    }