多选题14. DateFormat df;  15. Date date = new Date();  16. //insert code here  17. String s = df.format( date);  Which two,inserted independently at line 16, allow the code to compile?()Adf= new DateFormat();Bdf= Date.getFormatter();Cdf= date.getFormatter();Ddf= date.getDateFormatter();Edf = DateFormat.getDateInstance();Fdf= DateFormat.getInstance();

多选题
14. DateFormat df;  15. Date date = new Date();  16. //insert code here  17. String s = df.format( date);  Which two,inserted independently at line 16, allow the code to compile?()
A

df= new DateFormat();

B

df= Date.getFormatter();

C

df= date.getFormatter();

D

df= date.getDateFormatter();

E

df = DateFormat.getDateInstance();

F

df= DateFormat.getInstance();


参考解析

解析: 暂无解析

相关考题:

The liability for a dividend is recorded on which of the following dates?() A、the date of recordB、the date of paymentC、the date of announcementD、the date of declaration

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

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

下列程序将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)

以下可以获取系统当前日期的是( ) A.var k = new Date( );B.Date k = new Date( )C.var k = new date( )D.以上说法均不对

以下哪个语句能正确弹出结果: ( ) 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. 以上三个结果都正确

在某数据表中的执勤时间字段查找执勤时间30 之内的准则是( )。A.Between Date()Or Date-30B.Between Date()And Date()-30C.<Date()And>Date()-30D.<Date()Or>Date()-30

查询最近30天的记录应使用( )作为准则。A)Between Date( )And Date( )-30B)Between Date( )-30 And Date( )C)=Date( )-30D)Date( )-30

材料: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 yearsB.shorter than five yearsC.longer than 12 monthsD.shorter than 12 monthsWhen 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 certificateB.from the date of completion of the renewal survey to a date not exceeding five years from the date of expiry of the existing certificateC.from the date of expiry of the existing certificate to a date not exceeding 12 months from the dateD.from the date of expiry of the existing certificate to a date not exceeding five years from the dateIt 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 dateB.3 months before its expiry dateC.2 months before its expiry dateD.after its expiry dateWhen 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 certificateB.from the date of completion of the renewal survey to a date not exceeding five years from the date of expiry of the existing certificateC.from the date of expiry of the existing certificate to a date not exceeding 12 months from the dateD.from the date of completion of the renewal survey to a date not exceeding five years from that date请帮忙给出每个问题的正确答案和分析,谢谢!

New Zealand is the first country in the world to get the new day because()A、it is just east of the International Date LineB、it is just west of the International Date LineC、it is located halfway between the equator and the South PoleD、it is located in the Southern Pacific Ocean

Date、Calendar以及DateFormat类都位于java.util包中

产生当前日期的方法是()。A、Now()B、Date()C、new Date()D、new Now()

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-2004.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.

14. DateFormat df;  15. Date date = new Date();  16. //insert code here  17. String s = df.format( date);  Which two,inserted independently at line 16, allow the code to compile?()A、 df= new DateFormat();B、 df= Date.getFormatter();C、 df= date.getFormatter();D、 df= date.getDateFormatter();E、df = DateFormat.getDateInstance();F、 df= DateFormat.getInstance();

Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"?()A、SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE FROM dual;B、SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'Ddspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE FROM dual;C、SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY HH:MI:SS AM') NEW_DATE FROM dual;D、SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmtDdspth "of" Month YYYY fmtHH:MI:SS AM') NEW_DATE FROM dual;

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.

Given a valid DateFormat object named df,and 16.Date d = new Date(0L); 17.String ds = "December 15, 2004"; 18.//insert code here What updates d’s value with the date represented by ds?()A、18. d = df.parse(ds);B、18. d = df.getDate(ds);C、18. try {19. d = df.parse(ds);20. } catch(ParseException e) { };D、18. try {19. d = df.getDate(ds);20. } catch(ParseException e) { };

判断题Date、Calendar以及DateFormat类都位于java.util包中A对B错

单选题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?()AThe value of s is 14-dic-2000.BThe value of s is Dec 14, 2000.CAn exception is thrown at runtime.DCompilation fails because of an error in line 13.

单选题33. Date d = new Date(0);  34. String ds = “December 15, 2004”;  35. // insert code here  36. try {  37. d = df.parse(ds);  38. }  39. catch(ParseException e) {  40. System.out.println(”Unable to parse “+ ds);  41. }  42. // insert code here too  Which will create the appropriate DateFormat object and add a day to the Date object?()A 35. DateFormat df= DateFormat.getDateFormat(); 42. d.setTime( (60 * 60 * 24) +d.getTime());B 35. DateFormat df= DateFormat.getDateJnstance(); 42. d.setTime( (1000 * 60 * 60 * 24) + d.getTime());C 35. DateFormat df= DateFormat.getDateFormat(); 42. d.setLocalTime( (1000*60*60*24) + d.getLocalTime());D 35. DateFormat df= DateFormat.getDateJnstance(); 42. d.setLocalTime( (60 * 60 * 24) + d.getLocalTime());

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

单选题以下哪个语句能正确弹出结果:()Aalert(new Date(2011 , 12 , 25).getDay());Balert(new Date(2011 , 12 , 25 , 5).getDay());Calert(new Date(2011 , 12 , 25 , 5 , 5 , 9).getDay());D以上三个结果都正确

单选题Given a valid DateFormat object named df,and 16.Date d = new Date(0L); 17.String ds = "December 15, 2004"; 18.//insert code here What updates d’s value with the date represented by ds?()A18. d = df.parse(ds);B18. d = df.getDate(ds);C18. try {19. d = df.parse(ds);20. } catch(ParseException e) { };D18. try {19. d = df.getDate(ds);20. } catch(ParseException e) { };

多选题Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHAR2(10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column? ( )ASUM(start_date)BAVG(start_date)CCOUNT(start_date)DAVG(start_date,end_date)EMIN(start_date)FMAXIMUM(start_date)

单选题Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"? ()ASELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth of Month YYYY fmHH:MI:SS AM') NEW_DATE FROM dual;BSELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'Ddspth of Month YYYY fmHH:MI:SS AM') NEW_DATE HH:MI:SS AM') NEW _ DATE FROM dual;CSELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth of Month YYYY NEW _ DATE FROM dual;DSELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY), 'fmDdspth of Month YYYYfmtHH:HI:SS AM')NEW_DATE FROM dual;

单选题16. Date d = new Date(0L);  17. String ds = “December 15, 2004”;  18. // insert code here  What updates d‟s value with the date represented by ds?()A 18. d = df.parse(ds);B 18. d = df.getDate(ds);C 18. try { 19. d = df.parse(ds);  20. } catch(ParseException e) { };D 18. try {  19. d = df.getDate(ds);  20. } catch(ParseException e) { };

多选题Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHARD2(10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column?()ASUM(start_date)BAVG(start_date)CCOUNT(start_date)DAVG(start_date, end_date)EMIN(start_date)FMAXIMUM(start_date)