Which code fragment displays the three-character month abbreviation?

Given the code fragment:
SimpleDataFormat sdf;
Which code fragment displays the three-character month abbreviation?

Given the code fragment:
SimpleDataFormat sdf;
Which code fragment displays the three-character month abbreviation?

A.
SimpleDateFormat sdf = new SimpleDateFormat (“mm”, Locale.UK); System.out.println
(“Result:” +
sdf.format(new Date()));

B.
SimpleDateFormat sdf = new SimpleDateFormat (“MM”, Locale.UK); System.out.println
(“Result:” +
sdf.format(new Date()));

C.
SimpleDateFormat sdf = new SimpleDateFormat (“MMM”, Locale.UK); System.out.println
(“Result:” +
sdf.format(new Date()));

D.
SimpleDateFormat sdf = new SimpleDateFormat (“MMMM”, Locale.UK); System.out.println
(“Result:” +
sdf.format(new Date()));

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *