About Question enthuware.ocpjp.v8.2.1194 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
javalass
Posts: 54
Joined: Thu Mar 03, 2016 1:26 pm
Contact:

About Question enthuware.ocpjp.v8.2.1194 :

Post by javalass »

I'm not sure what week-based-year means (the API examples are unclear), but both 'MM/yy' and 'MM/YY' formats print the same when I run them:

Code: Select all

        SimpleDateFormat normalYear = new SimpleDateFormat("MM/YY", Locale.US);
        SimpleDateFormat weekYear = new SimpleDateFormat("MM/yy", Locale.US);
        Date date = new Date();
        System.out.println(normalYear.format(date));//prints 03/16
        System.out.println(weekYear.format(date));//prints 03/16

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1194 :

Post by admin »


javalass
Posts: 54
Joined: Thu Mar 03, 2016 1:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1194 :

Post by javalass »

Ah, ok. Not something I'd ever use, I don't think. But at least I know the difference now.

Thank you so much for that, Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests