arctanx
2007-04-16 12:13:53 UTC
新手發問
這是課本後面習題
class A
{
int i;
public A(int i)
{
this.i=i;
}
}
public class Test extends A{
public static void main(String[] arg){
A aaa=new A(10);
System.out.println(aaa.i);
}
}
error message:
D:\java\debug>javac Test.java
Test.java:12: cannot find symbol
symbol : constructor A()
location: class A
public class Test extends A{
^
1 error
請問
為什麼有錯ㄚ? 先謝謝摟~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.169.112.86
這是課本後面習題
class A
{
int i;
public A(int i)
{
this.i=i;
}
}
public class Test extends A{
public static void main(String[] arg){
A aaa=new A(10);
System.out.println(aaa.i);
}
}
error message:
D:\java\debug>javac Test.java
Test.java:12: cannot find symbol
symbol : constructor A()
location: class A
public class Test extends A{
^
1 error
請問
為什麼有錯ㄚ? 先謝謝摟~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.169.112.86