string[] ss={"hello world!","您好,世界!","hello world!!"}; public void teststringarray(int index){ if(index<ss.length){ for(int i=0;i<=index;i++){ system.out.println (ss[i]); } teststringarray(index+1); }else{ system.out.println ("数组越界"); } }