SCJP 1.6版考題 202

出自 陳富國維基館
前往: 導覽搜尋

SCJP202-1.png

SCJP202-2.png


Given:
NumberNames nn = new NumberNames();
nn.put("one", 1);
System.out.println(nn.getNames());

Place the code into position to create a class that maps from Strings to integer values. 
The result of execution  must be [one]. Some options may be used more than once.

解答


Ans:
SCJP202-3.png

解說:

此題問建立一個字串對應到整數值的集合