当前位置:OCJP(310-065)题库

问题:

[多选]

Given:

A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()

A . public int hashCode()
B . public boolean equals(Key k)
C . public int compareTo(Object o)
D . public boolean equals(Object o)
E . public boolean compareTo(Key k)

以下的中国古代著作中反映了概预算定额管理内容的有() A.《齐民要术》 。 B.《梦溪笔谈》 。 C.《营造法式》 。 D.工程做法则例。 Given:   12. NumberFormat nf = NumberFormat.getInstance();   13. nf.setMaximumFractionDigits(4);   14. nf.setMinimumFractionDigits(2);   15. String a = nf.format(3.1415926);   16. String b = nf.format(2);   Which two statements are true about the result if the default locale is Locale.US?()  The value of b is 2.00.。  The value of a is 3.141.。  The value of a is 3.14.。  The value of b is 2.0000.。  The value of a is 3.1415.。  The value of a is 3.1416.。  The value of b is 2.。 下列实行以中央集权为特征的地方税制体系的是()。 英国。 法国。 日本。 美国。 绝缘油在电弧作用下产生的气体大部分是()。 甲烷(CH4),乙烯(C2H4)等烃类气体。 氢(H2),乙炔(C2H2)。 一氧化碳(CO),二氧化碳(CO2)。 封堵三通一般应存放在()的环境中。 干燥、防潮。 空气干燥。 通风。 宽敞。

Given:

A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key?()

参考答案:

  参考解析

本题暂无解析

在线 客服