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()))
Given the code fragment:SimpleDateFormat sdf;Which code fragment displays the two-digit month number?
-
- Site Admin
- Posts: 899559
- Joined: Mon Aug 02, 2021 8:13 am