[蟲?] 奇怪的can not find symbol

看板java作者 (jim)時間13年前 (2011/03/29 02:48), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
問題(Question): 我寫了MyArray物件的方法MyArray(String input) 可是錯誤訊息說找不到這個方法 預期的正確結果(Expected Output): 能印出cnt 錯誤結果(Wrong Output): C:\javaCode>javac MyArray.java MyArray.java:64: cannot find symbol symbol : method MyArray(java.lang.String) location: class MyArray MA.MyArray(args[0]); ^ 1 error 程式碼(Code):(請善用置底文網頁, 記得排版) http://pastie.org/1727543 補充說明(Supplement): 我是新手 我檢查了好幾遍都發現不了錯誤XD 簡單問題請海函 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.123.128.60 ※ 編輯: chessjim 來自: 122.123.128.60 (03/29 02:49)

03/29 02:56, , 1F
建構子不是這樣用的。應是MyArray MA=new MyArray(args[0]);
03/29 02:56, 1F
※ 編輯: chessjim 來自: 122.123.128.60 (03/29 02:58)

03/29 03:00, , 2F
超級感謝^^
03/29 03:00, 2F
文章代碼(AID): #1DaDVaxv (java)