单选题

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.

正确答案

来源:www.examk.com

答案解析

相似试题
  • Given:   12. System.out.format("Pi is approximately %d.", Math.PI);   What is the result?()

    单选题查看答案

  • Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()

    单选题查看答案

  • 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?()

    单选题查看答案

  • Given the following directory structure: bigProject |--source ||--Utils.java| |--classes |-- And the following command line invocation: javac -d classes source/Utils.java Assume the current directory is bigProject,what is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: Which statement is true?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: What is the result?()

    单选题查看答案

  • Given: Which three are true?()

    多选题查看答案