CMS专题

单选题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.

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第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: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

第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题:

材料:

A Passenger Ship Safety Certificate shall be issued for a period not exceeding 12 months.A Cargo Ship Safety Construction Certificate,Cargo Ship Safety Equipment Certificate and Cargo Ship Safety Radio Certificate shall be issued for a period specified by the Administration which shall not exceed five years.

An Exemption Certificate shall not be valid for longer than the period of the certificate to which it refers.

(i)When the renewal survey is completed within three months before the expiry date of the existing certificate,the new certificate shall be valid from the date of completion of the renewal survey to:

(1)for a passenger ship,a date not exceeding 12 months from the date of expiry of the existing certificate;

(2)for a cargo ship,a date not exceeding five years from the date of expiry of the existing certificate;

(ii)When the renewal survey is completed after the expiry date of the existing certificate,the new certificate shall be valid from the date of completion of the renewal survey to:

(1)for a passenger ship,a date not exceeding 12 months from the date of expiry of the existing certificate;

(2)for a cargo ship,a date not exceeding five years from the date of expiry of the existing certificate;

(iii)when the renewal survey is completed more than three months before the expiry date of the existing certificate,the new certificate shall be valid from the date of completion of the renewal survey to:

(1)for a passenger ship,a date not exceeding 12 months from the date of completion of the renewal survey;

(2)for a cargo ship,a date not exceeding five years from the date of completion of the renewal survey.

问题:

The valid period of an Exemption Certificate for Cargo Ship Safety Equipment Certificate shall be ________.

A.longer than five years

B.shorter than five years

C.longer than 12 months

D.shorter than 12 months

When the renewal survey is completed within one month before the expiry date of the existing Cargo Ship Safety Construction Certificate,the new certificate shall be valid ________.A.from the date of completion of the renewal survey to a date not exceeding 12 months from the date of expiry of the existing certificate

B.from the date of completion of the renewal survey to a date not exceeding five years from the date of expiry of the existing certificate

C.from the date of expiry of the existing certificate to a date not exceeding 12 months from the date

D.from the date of expiry of the existing certificate to a date not exceeding five years from the date

It can be concluded that the actual period of validity of a new Passenger Ship Safety Certificate is less than 12 months if the renewal survey is completed ________.A.4 months before its expiry date

B.3 months before its expiry date

C.2 months before its expiry date

D.after its expiry date

When the renewal survey is completed on a date which is 99 days before the expiry date of the existing Cargo Ship Safety Radio Certificate,the new certificate shall be valid ________.A.from the date of completion of the renewal survey to a date not exceeding 12 months from the date of expiry of the existing certificate

B.from the date of completion of the renewal survey to a date not exceeding five years from the date of expiry of the existing certificate

C.from the date of expiry of the existing certificate to a date not exceeding 12 months from the date

D.from the date of completion of the renewal survey to a date not exceeding five years from that date

请帮忙给出每个问题的正确答案和分析,谢谢!


问题 1 答案解析:B


问题 2 答案解析:B


问题 3 答案解析:D


问题 4 答案解析:D

第5题:

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

A.var k = new Date( );

B.Date k = new Date( )

C.var k = new date( )

D.以上说法均不对


正确答案:A

第6题:

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

第7题:

下列程序将Date对象写入文件file42.txt中,选择正确的语句填入下列程序中的横线处。 package ch1; impbrt java. io. *; import java. util. *; public class ex42 { static String fileName = "ch1\\file42.txt"; static Date date = null; public static void main(String[] args) { date = new Date(); try { FileOutputStream fos = new FileOutputStream(file Name); ObjectOutStream os = new ObjectOutputStream(fos); oos.______; oos.close(); fos.close(); System.out.println(date.toString()); } catch(Exception e) { System.out.println(e.getMessage()); } } }

A.writeObject()

B.writeObject(date)

C.write(date)

D.writeByte(date)


正确答案:B

第8题:

A briefing is a short presentation usually given at a meeting or a conference to bring people up to date on business activities , projects , programs or procedures.


参考答案:简报是一种口头陈述,它通常在开会时用来通报公司最新的活动、项目、计划或程序。

第9题:

以下哪个语句能正确弹出结果: ( )

A. alert(new Date(2011 , 12 , 25).getDay());

B. alert(new Date(2011 , 12 , 25 , 5).getDay());

C. alert(new Date(2011 , 12 , 25 , 5 , 5 , 9).getDay());

D. 以上三个结果都正确


正确答案:D

第10题:

New Zealand is the first country in the world to get the new day because()

Ait is just east of the International Date Line

Bit is just west of the International Date Line

Cit is located halfway between the equator and the South Pole

Dit is located in the Southern Pacific Ocean


B

更多相关问题