看板 java 關於我們 聯絡資訊
※ 引述《Taique.bbs@ptt.cc (阿薩布魯‧湖瀾)》之銘言: : class A{ : private int x,y; : A(int x, int y){ 由於有任一明確的constructor存在, 不會有default constructor : this.x=x;this.y=y;} : void printXY(){System.out.print("A: x=" + x + ", y=" + y);} : } : ============================================================= : 上面的程式碼為什麼會產生找不到class A的Constructor的compile error? : 不是應該會有 Default Constructor 嗎? -- ╭──── Origin:<不良牛牧場> bbs.badcow.com.tw (210.200.247.200)─────╮ Welcome to SimFarm BBS -- From : [210.64.83.245] ◣◣◢ ◢◢不良牛免費撥接→電話:40586000→帳號:zoo→密碼:zoo ◣◣─╯