About Question enthuware.ocpjp.v8.2.1194 :
Posted: Sun Mar 20, 2016 6:38 am
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