public static void main(String[] args) {
    String[] temp = getRecipients();
    for (int i = 0; i < temp.length; i++) {
        System.out.println(tmep[i]);
    }
}

解决方案 »

  1.   

    string[] abc = aaa.getRecipients();
    for(int i= 0;i<abc.length;i++) system.out.println(abc[i]);
      

  2.   

    public void display(String[] strArr) {
            int size = (strArr == null) ? 0 : strArr.length;
            for (int i = 0; i < size; i++) {
                System.out.println(strArr[i]);
            }    
        }
        
        public String[] getRecipients(){
            String[] strArr = {"ABCD","EFGH","IJKL"};
            display(strArr);
            return strArr;
        }
      

  3.   

    aaaluo(奥拓) 的答案就相对完整一点了,至少可以避免出现NullPointerException异常.
      

  4.   

    楼上的string[] abc = aaa.getRecipients();
    得改成string[] abc = AAA.getRecipients();
      

  5.   

    aaaluo(奥拓) 已经搞定了。