I am trying to find out weekdays using DateFormatSymbols and here is a short programe
String[] shortWeekdays = new DateFormatSymbols().getShortWeekdays();
System.out.println(shortWeekdays.length);
for (int i = 0; i < shortWeekdays.length; i++) {
String shortWeekday = shortWeekdays[i];
System.out.println("shortWeekday = " + shortWeekday);
}
and it is giving me folloiwng output
- shortWeekday =
- shortWeekday = Sun
- shortWeekday = Mon
- shortWeekday = Tue
- shortWeekday = Wed
- shortWeekday = Thu
- shortWeekday = Fri
- shortWeekday = Sat
i am not sure why its giving total length as 8 while it should give it as 7