OCJP(310-065)

单选题Given: 12.Date date = new Date(); 13.df.setLocale(Locale.ITALY); 14.String s = df.format(date); The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14, 2000?()A The va

题目
单选题
Given: 12.Date date = new Date(); 13.df.setLocale(Locale.ITALY); 14.String s = df.format(date); The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14, 2000?()
A

The value of s is 14-dic-2000.

B

The value of s is Dec 14, 2000.

C

An exception is thrown at runtime.

D

Compilation fails because of an error in line 13.

参考答案和解析
正确答案: C
解析: 暂无解析
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Datedate=newDate();13.df.setLocale(Locale.ITALY);14.Strings=df.format(date);ThevariabledfisanobjectoftypeDateFormatthathasbeeninitializedinline11.WhatistheresultifthiscodeisrunonDecember14,2000?()

A.Thevalueofsis14-dic-2004.

B.ThevalueofsisDec14,2000.

C.Anexceptionisthrownatruntime.

D.Compilationfailsbecauseofanerrorinline13.


参考答案:D

第2题:

Given: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();


参考答案:E

第3题:

An activity has an early start date-of the lOth and a late start date of the 19th. The activity also has a duration of 4 days. There are no nonworkdays. From the information given, ()what can be concluded about the activity?

A.Total float for the activity is 9 days.

B.The early finish date ofthe activity is the end ofthe day on the 14th.

C.The late finish date is the 25th.

D.The activity can be completed in 2 days ifthe resources devoted to it are doubled.


参考答案:A

第4题:

what’s your date of birth?


正确答案:My date of birth is May 18th, 1990.

第5题:

回答What's today's date? /What's the date today?正确的句子是:()

A、It's cold today.

B、It's February AD.

C、It's Friday.

D、It's Valentine's Day.


参考答案:B

第6题:

DateFormatdf;15.Datedate=newDate();16.//insertcodehere17.Strings=df.format(date);Whichtwo,insertedindependentlyatline16,allowthecodetocompile?()

A.df=newDateFormat();

B.df=Date.getFormatter();

C.df=date.getFormatter();

D.df=date.getDateFormatter();

E.df=DateFormat.getDateInstance();

F.df=DateFormat.getInstance();


参考答案:E, F

第7题:

Given:12.Datedate=newDate();13.df.setLocale(Locale.ITALY);14.Strings=df.format(date);ThevariabledfisanobjectoftypeDateFormatthathasbeeninitializedinline11.WhatistheresultifthiscodeisrunonDecember14,2000?()

A.Thevalueofsis14-dic-2000.

B.ThevalueofsisDec14,2000.

C.Anexceptionisthrownatruntime.

D.Compilationfailsbecauseofanerrorinline13.


参考答案:D

第8题:

-________?

-It's Sunday.

A、What day is it today

B、What date is it today

C、What's the date

D、What's day


参考答案:A

第9题:

Other than academic success, what has been your greatest achievement up to date? What do you see as your personal strength, why?


正确答案:

 

 

第10题:

以下可以获取系统当前日期的是( )

A.var k = new Date( );

B.Date k = new Date( )

C.var k = new date( )

D.以上说法均不对


正确答案:A

更多相关问题