可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Assume that country is


Assume that country is set for each class.  Given:  10. public class Money {  11. private String country, name;  12. public getCountry() { return country; }  13.}  and:  24. class Yen extends Money {  25. public String getCountry() { return super.country; }  26. }  27.  28. class Euro extends Money {  29. public String getCountry(String timeZone) {  30. return super.getCountry();  31. }  32. }  Which two are correct?()

  • A Yen returns correct values.
  • B Euro returns correct values.
  • C An exception is thrown at runtime.
  • D Yen and Euro both return correct values.
  • E Compilation fails because of an error at line 25.
  • F Compilation fails because of an error at line 30.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、Assume a JavaBean com.

Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is of...

2、Assume session is an&e

Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two&e...

3、A switch that is 

A switch that is to be added to the production network has been preconfigured (trunks, V...

4、Assume the tag handler

Assume the tag handler for a st:simple tag extends Simple Tag Support.In what way can scriptlet&e...

5、Given that session is&

Given that session is a valid HttpSession object:  Int max = session.getAttribute(MyReallyLongName);&...

6、表达式10>5&&6%3的值是()

表达式10>5&&6%3的值是()A-1B非零值C0D1