yu(int i,char a,char b,char c){
     yu(i,a,c,b);
}我这样怎么总出错啊 
怎么总说我的YU方法没用定义啊 
 问下 怎么定义啊

解决方案 »

  1.   

    就是返回了还是错啊 
    cannot resolve symbol method
    在教教我  谢谢了
      

  2.   

    yu(int i,char a,char b,char c){
         yu(i,a,c,b);
    }...........
    大哥,你这是定义的什么?
    方法不是方法,类不是类,人看了都晕呼呼的,你说JDK见了不晕啊
      

  3.   

    给你写了个简单的递归例子:public class OtherTest {
        public static void main(String[] args) {
           call(100);
        }    public static void call(int n){
            if(n == 0) return;
            System.out.println(n);
            call(--n);
        }
    }
      

  4.   

    晕,多参数和一个参数本质上有什么区别吗?
    public class OtherTest {
    public static void main(String[] args) {
    call(100, 100);
    }    public static void call(int n, int m){
            if(n == 0 || m == 0) return;
            System.out.println(n * n);
            call(--n, --m);
        }
    }
      

  5.   

    System.out.println(n * n);更正
    System.out.println(n * m);
      

  6.   

    。你得递归不设下return条件,这样不是死循环?返回值不一定要啊,void 也可以的
      

  7.   

    yu(int i,char a,char b,char c){
      int i=0;
      char a,b,c;
      a='';b='';c='';
         yu(i,a,c,b);
    }
    函数里面的变量是需要定义的。