scjp的题,求解,满分

wzy888 2003-09-16 05:16:48
Suppose you want to write a class that offers static methods to compute
hyperbolic trigonometric functions. You decide to subclass
java.lang.Math and provide the new functionality as a set of static
methods. Which one statement below is true about this strategy?
A. The strategy works.
B. The strategy works, provided the new methods are public.
C. The strategy works, provided the new methods are not private.
D. The strategy fails, because you cannot subclass java.lang.Math.
E. The strategy fails, because you cannot add static methods to a subclass.
...全文
89 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
minghui000 2004-02-03
  • 打赏
  • 举报
回复
up
dytsoft 2004-02-01
  • 打赏
  • 举报
回复
三人行,必要我师,何况这里不止三人,大家都是老师,学习
binny 2004-01-17
  • 打赏
  • 举报
回复
D
icy_csdn 2004-01-17
  • 打赏
  • 举报
回复
题意是You decide to subclass java.lang.Math
所以应该是D襾不是C。
peninsular 2004-01-17
  • 打赏
  • 举报
回复
D
rockingcat 2004-01-16
  • 打赏
  • 举报
回复
D~~~~~~~~~~~~~
panpan221 2004-01-02
  • 打赏
  • 举报
回复
应该是C吧
yoken 2004-01-02
  • 打赏
  • 举报
回复
d
java.lang.Math is final and can't be inherited
diaopeng 2003-09-24
  • 打赏
  • 举报
回复
C,因为Math类不能被继承
noizz 2003-09-17
  • 打赏
  • 举报
回复
实际编译一下不是所有都出来了吗????

Math是 final class,不允许继承的。
kos_upc 2003-09-17
  • 打赏
  • 举报
回复
Sorry ,my answer maybe D.
kos_upc 2003-09-17
  • 打赏
  • 举报
回复
C
because The class of Math is a static class. We can't provide a new subclass from it.
But you can make a new class in which you use the math's static method.
njucon 2003-09-17
  • 打赏
  • 举报
回复
the answer should be d

50,530

社区成员

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

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