Which code statements will display the full text month name?

Given the code format:
SimpleDateFormat sdf;
Which code statements will display the full text month name?

Given the code format:
SimpleDateFormat sdf;
Which code statements will display the full text month name?

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

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

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

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

Explanation:

Typical output would be
Current Month in M format: 2
Current Month in MM format: 02
Current Month in MMM format: Feb
Current Month in MMMM format: February



Leave a Reply 2

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


gelete

gelete

D

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