Re: [問題] JAVA的call by value

看板java作者 (不告訴你..)時間19年前 (2007/03/24 22:23), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/7 (看更多)
※ 引述《ldg (ldg)》之銘言: : class student{ : static void print(){ : ... : } : static number; : public static void main(String[] args){ : student[] s=new student[3]; : int i; : for(i=0;i<3;i++){ : s[i]=new student(); : s[i].number=i; : } : student.print(); : } : } 小弟我剛學java不久 ,說錯請見諒喔.. 請高手指教了. 第一行應該要加 public, student.print(); 這行的意思是? 如果要使用print(),應該是用s[] 來呼叫才是 你的程式碼 並沒有叫做student的實體. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.93.250
文章代碼(AID): #161JHUXq (java)
討論串 (同標題文章)
文章代碼(AID): #161JHUXq (java)