看板 [ java ]
討論串[問題] static method
共 8 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者qrtt1 (隱者)時間19年前 (2006/06/19 17:40), 編輯資訊
0
0
0
內容預覽:
因為你沒有正確產生test物件, 所以不能呼叫test的方法. public class test {. public static void main(String args[]) {. System.out.print(new test().more(2, 4, 4, 4));. }. publ

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者hpeter (hpeter)時間19年前 (2006/06/19 17:39), 編輯資訊
0
0
0
內容預覽:
小弟覺得 因為被 static function 用到的東西. 一定要有static 之修飾. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 163.25.101.82.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者justinC (無)時間19年前 (2006/06/19 17:33), 編輯資訊
0
0
0
內容預覽:
public class test {. public static void main(String args[]) {. System.out.print(more(2,4,4,4));. }. public static int more(int... num). {. int total=0
(還有14個字)
首頁
上一頁
1
2
下一頁
尾頁