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

题目
单选题
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));


相似考题
更多“单选题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.”相关问题
  • 第1题:

    下列生成的Locale对象为汉语语种相关的是()

    • A、Locale locale=new Locale("ko","");
    • B、Locale locale=new Locale("ja","");
    • C、Locale locale=new Locale("en","US");
    • D、Locale locale=new Locale("zh","");
    • E、Locale locale=new Locale("es","");

    正确答案:D

  • 第2题:

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

    正确答案:B

  • 第3题:

    What is the name of the file that identifies the set of available locale definitions?()

    • A、 locale.def
    • B、 lxdef.ora
    • C、 lx1boot.nlb
    • D、 lx1boot.ora
    • E、 lang.def

    正确答案:C

  • 第4题:

    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) { };

    正确答案:C

  • 第5题:

    单选题
    下列选项中不能能获得Locale实例是()
    A

    Locale locale=new Locale();

    B

    Locale locale=new Locale(ch,CH);

    C

    Locale locale=Locale.CHINA;

    D

    Locale locale =request.getLocale();


    正确答案: D
    解析: 暂无解析

  • 第6题:

    单选题
    下列生成的Locale对象为汉语语种相关的是()
    A

    Locale locale=new Locale(ko,);

    B

    Locale locale=new Locale(ja,);

    C

    Locale locale=new Locale(en,US);

    D

    Locale locale=new Locale(zh,);

    E

    Locale locale=new Locale(es,);


    正确答案: B
    解析: 暂无解析

  • 第7题:

    单选题
    What is the name of the file that identifies the set of available locale definitions?()
    A

    locale.def

    B

    lxdef.ora

    C

    lx1boot.nlb

    D

    lx1boot.ora

    E

    lang.def


    正确答案: B
    解析: 暂无解析

  • 第8题:

    单选题
    Which is not a valid locale definition file type?()
    A

     Language

    B

     Linguistic sort

    C

     Calendar

    D

     Territory

    E

     Character set


    正确答案: C
    解析: 暂无解析

  • 第9题:

    多选题
    Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of text from the console?()
    A

    String s = c.readLine();

    B

    char[ ] c = c.readLine();

    C

    String s = c.readConsole();

    D

    char[ ] c = c.readConsole();

    E

    String s = c.readLine(%s, name );

    F

    char[ ] c = c.readLine(%s, name );


    正确答案: B,D
    解析: 暂无解析

  • 第10题:

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


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    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) { };


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    You are drifting in a locale where there is no current.As a rule,your vessel will lie().
    A

    Bow to the wind

    B

    Beam to the wind

    C

    Stern to the wind

    D

    With the wind on the quarter


    正确答案: A
    解析: 暂无解析

  • 第13题:

    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.

    正确答案:D

  • 第14题:

    Which is not a valid locale definition file type?()

    • A、 Language
    • B、 Linguistic sort
    • C、 Calendar
    • D、 Territory
    • E、 Character set

    正确答案:C

  • 第15题:

    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.

    正确答案:D

  • 第16题:

    You create a Web Form that contains a text box named txtDate. You want the text box to allow users to enter any valid date. You need to use an ASP.NET validation control to ensure that only valid date values are submitted to the server. What should you do?()

    • A、Add a CompareValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its Operator property to DataTypeCheck.
    • B、Add a RangeValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its MinimumValue property to 01/01/1900 and its MaximumValue to the current date.
    • C、Add a CustomValidator control to the Web Form. Set its ControlToValidate property to txtDate. Write a function in the partial class that verifies the values as dates and returns a Boolean variable. Set the CustomValidators ClientValidationFunction to the name of your function.
    • D、Add a RegularExpressionValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set the ValidationExpression property to ensure that the users input follows the format of nn-nn-nnnn, where n represents a number from 0 through 9.

    正确答案:A

  • 第17题:

    单选题
    You create a Web Form that contains a text box named txtDate. You want the text box to allow users to enter any valid date. You need to use an ASP.NET validation control to ensure that only valid date values are submitted to the server. What should you do? ()
    A

    Add a CompareValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its Operator property to DataTypeCheck.

    B

    Add a RangeValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its MinimumValue property to 01/01/1900 and its MaximumValue to the current date.

    C

    Add a CustomValidator control to the Web Form. Set its ControlToValidate property to txtDate. Write a function in the partial class that verifies the values as dates and returns a Boolean variable. Set the CustomValidators ClientValidationFunction to the name of your function.

    D

    Add a RegularExpressionValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set the ValidationExpression property to ensure that the users input follows the format of nn-nn-nnnn, where n represents a number from 0 through 9.


    正确答案: B
    解析: 暂无解析

  • 第18题:

    单选题
    Which is not a valid locale definition file type?()
    A

    Language

    B

    Linguistic sort

    C

    Calendar

    D

    Territory

    E

    Character set


    正确答案: D
    解析: 暂无解析

  • 第19题:

    单选题
    What is the name of the file that identifies the set of available locale definitions?()
    A

     locale.def

    B

     lxdef.ora

    C

     lx1boot.nlb

    D

     lx1boot.ora

    E

     lang.def


    正确答案: C
    解析: 暂无解析

  • 第20题:

    单选题
    You create a Web Form that contains a text box named txtDate. You want the text box to allow users to enter any valid date. You need to use an ASP.NET validation control to ensure that only valid date values are submitted to the server. What should you do? ()
    A

    Add a CompareValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its Operator property to DataTypeCheck.

    B

    Add a RangeValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its MinimumValue property to 01/01/1900 and its MaximumValue to the current date.

    C

    Add a CustomValidator control to the Web Form. Set its ControlToValidate property to txtDate. Write a function in the partial class that verifies the values as dates and returns a Boolean variable. Set the CustomValidators ClientValidationFunction to the name of your function.

    D

    Add a RegularExpressionValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set the ValidationExpression property to ensure that the users input follows the format of nn-nn-nnnn, where n represents a number from 0 through 9.


    正确答案: C
    解析: 暂无解析

  • 第21题:

    多选题
    Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()
    A

    String s = c.readLine();

    B

    char[] c = c.readLine();

    C

    String s = c.readConsole();

    D

    char[] c = c.readConsole();

    E

    String s = c.readLine(%s, name );


    正确答案: B,D
    解析: 暂无解析

  • 第22题:

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


    正确答案: A
    解析: 暂无解析

  • 第23题:

    单选题
    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) { };


    正确答案: C
    解析: 暂无解析