Page 1 of 1

Given the code fragment:SimpleDateFormat sdf;Which code fragment displays the two-digit month number?

Posted: Wed Jun 07, 2023 6:11 am
by answerhappygod
Given the code fragment:SimpleDateFormat sdf;Which code fragment displays the two-digit month number?

A. sdf = new SimpleDateFormat ("mm", Locale.UK); System.out.printIn ( Result: + sdf.format(new Date()))
B. sdf = new SimpleDateFormat ("MM", Locale.UK); System.out.printIn ( Result: + sdf.format(new Date()))
C. sdf = new SimpleDateFormat ("MMM", Locale.UK); System.out.printIn ( "Result: " + sdf.format(new Date()))
D. sdf = new SimpleDateFormat ("MMMM", Locale.UK); System.out.printIn ( "Result: " + sdf.format(new Date()))