看板 java 關於我們 聯絡資訊
抱歉小弟還有一個問題沒有搞懂 先謝過各位這麼熱心指點 class student{ int num; static void A(){ ... } public static void main(String[] args){ student[] s=new student[3]; int i; for(i=0;i<3;i++) s[i]=new student(); ... } } 請問有沒有方法 可以讓A這個method 在不改變其參數(傳入值)的條件下 讓這個method可以處理s[] 有點像是在 public static student[] s=new student[3]; (當然這是錯的) 那有方法可以達到這種概念嗎? 抱歉問題有點多 但是希望起頭時就接觸正確的資訊 以養成OO的正確習慣 謝謝指點了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.192.211.79