回答对了就给分哦 哈哈 最好是带上解释哦 ......

williamxa2008 2008-04-21 04:36:44
Which three statements are true? (Choose three.)
A. A final method in class X can be abstract if and only if X is abstract.
B. A protected method in class X can be overridden by any subclass of
X.
C. A private static method can be called only within other static
methods in class X.
D. A non-static public final method in class X can be overridden in any
subclass of X.
E. A public static method in class X can be called by a subclass of X
without explicitly referencing the class X.
F. A method with the same signature as a private final method in class
X can be implemented in a subclass of X.
G. A protected method in class X can be overridden by a subclass of A
only if the subclass is in the same package as X.
...全文
198 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
williamxa2008 2008-04-21
  • 打赏
  • 举报
回复
感觉还是你明智...... 哈哈 翻译的比较到位......呵呵
南南北北 2008-04-21
  • 打赏
  • 举报
回复
A method with the same signature as a private final method in class
X can be implemented in a subclass of X.

和x类的private final方法具有相同的签名的方法可以在x的子类中实现.

implemente在这里不是关键字.
  • 打赏
  • 举报
回复
补充一下 那个不是重写 定义了一个新方法而已
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 suntoto 的回复:]
EFG
A method with the same signature as a private final method in class
X can be implemented in a subclass of X.
当然能执行,虽然在X ,subclass of X.中签名相同,只有重载才能这样。
private final method 根本不能重写。
[/Quote]
pbulic final method也不能重写

我觉得关键是private 因为这个方法并不在子类中 所以可以相同
suntoto 2008-04-21
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 suntoto 的回复:]
EFG
A method with the same signature as a private final method in class
X can be implemented in a subclass of X.
当然能执行,虽然在X ,subclass of X.中签名相同,只有重载才能这样。
private final method 根本不能重写。

[/Quote]
看错了 BEF
suntoto 2008-04-21
  • 打赏
  • 举报
回复
EFG
A method with the same signature as a private final method in class
X can be implemented in a subclass of X.
当然能执行,虽然在X ,subclass of X.中签名相同,只有重载才能这样。
private final method 根本不能重写。
williamxa2008 2008-04-21
  • 打赏
  • 举报
回复
美女 把F解释下 谢了
williamxa2008 2008-04-21
  • 打赏
  • 举报
回复
G肯定错了 就不用解释了 谢啦 哈哈
williamxa2008 2008-04-21
  • 打赏
  • 举报
回复
请你把你理解了的F给我再解释一下哦 谢谢
goosman 2008-04-21
  • 打赏
  • 举报
回复
EFG
  • 打赏
  • 举报
回复
翻了一下书 俺错了 BEF
南南北北 2008-04-21
  • 打赏
  • 举报
回复
BEF
  • 打赏
  • 举报
回复
B和G似乎只有一个对的 B应该是错的
那答案是 EFG
  • 打赏
  • 举报
回复
A. A final method in class X can be abstract if and only if X is abstract.
final方法不能重写 abstract应该不行 错

B. A protected method in class X can be overridden by any subclass of
X.
这个应该可以吧 对

C. A private static method can be called only within other static
methods in class X.
普通的方法应该也可以访问吧 错

D. A non-static public final method in class X can be overridden in any
subclass of X.
final方法不能被重写 错

E. A public static method in class X can be called by a subclass of X
without explicitly referencing the class X.
应该可以 继承了父类 当然子类也有这个方法 对

F. A method with the same signature as a private final method in class
X can be implemented in a subclass of X.
签名忘了什么意思 这句理解不透 排除法 所以错

G. A protected method in class X can be overridden by a subclass of A
only if the subclass is in the same package as X.
protected应该只能本包内访问 跨包应该不能 对

俺猜正确答案BEG
williamxa2008 2008-04-21
  • 打赏
  • 举报
回复
把你的想法说出来 谢谢 F 解释F就行了
sheepandducky 2008-04-21
  • 打赏
  • 举报
回复
F G and ...

50,523

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧