阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 151-200#99330 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 151-200#99330

年份:104年

科目:OJCP(SCJP)

165. Given: 
5. import java.util.Date;
 6. import java.text.DateFormat; 
21. DateFormat df; 
22. Date date = new Date();
 23. //insert code here 
24. String s = df.format(date); 
Which code fragment, inserted at line 23, allows the code to compile?
(A) df = new DateFormat();
(B) df = Date.getFormat();
(C) df = date.getFormat();
(D) df = DateFormat.getFormat();
(E) df = DateFormat.getInstance();
正確答案:登入後查看