阿摩線上測驗 登入

試題詳解

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

試卷資訊

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

年份:104年

科目:OJCP(SCJP)

164. Given: 
1. d is a valid, non-null Date object 
2. df is a valid, non-null DateFormat object set to the current locale
 What outputs the current locale's country name and the appropriate version of d's date?
(A) Locale loc = Locale.getLocale(); System.out.println(loc.getDisplayCountry() + " " + df.format(d));
(B) Locale loc = Locale.getDefault(); System.out.println(loc.getDisplayCountry() + " " + df.format(d));
(C) Locale loc = Locale.getLocale(); System.out.println(loc.getDisplayCountry() + " " + df.setDateFormat(d));
(D) Locale loc = Locale.getDefault(); System.out.println(loc.getDisplayCountry() + " " + df.setDateFormat(d));
正確答案:登入後查看