nerdexam
Oracle

1Z0-804 · Question #154

Given the code fragment: SimpleDateFormat sdf = new SimpleDateFormat("zzzz", Locale.US); System.out.println ("Result: " + sdf.format(today) ) ; What type of result is printed?

The correct answer is A. Time zone abbreviation. Assuming that the variable today contains a date, the time zone abbreviation, such as Pacific Standard Time or Central European Summer Time, will be printed.

Localization

Question

Given the code fragment:

SimpleDateFormat sdf = new SimpleDateFormat("zzzz", Locale.US); System.out.println ("Result: " + sdf.format(today) ) ; What type of result is printed?

Options

  • ATime zone abbreviation
  • BFull-text time zone name
  • CEra
  • DJulian date
  • ETime of the Epoch (in milliseconds)

How the community answered

(28 responses)
  • A
    79% (22)
  • B
    14% (4)
  • C
    4% (1)
  • E
    4% (1)

Explanation

Assuming that the variable today contains a date, the time zone abbreviation, such as Pacific Standard Time or Central European Summer Time, will be printed.

Topics

#SimpleDateFormat#time zone formatting#format patterns#date localization

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice