当前位置: 技术问答>java相关
一道scjp模拟题,请赐教。
来源: 互联网 发布时间:2015-10-17
本文导语: 原题如下: Which of the following statements are true? 1) Constructors are not inherited 2) Constructors can be overriden 3) A parental constructor can be invoked using this 4) Any method may contain a call to this or super 请问,为什么4...
原题如下:
Which of the following statements are true?
1) Constructors are not inherited
2) Constructors can be overriden
3) A parental constructor can be invoked using this
4) Any method may contain a call to this or super
请问,为什么4)不对?
Which of the following statements are true?
1) Constructors are not inherited
2) Constructors can be overriden
3) A parental constructor can be invoked using this
4) Any method may contain a call to this or super
请问,为什么4)不对?
|
应该是因为 静态方法吧,在静态方法中不能用 this super