[ code = java ]
import java.util.GregorianCalendar;
public class Aries {
public static void main(String[] args) {
GregorianCalendar c = new GregorianCalendar(2019, 5, 7);
System.out.println("Day:" + c.get(GregorianCalendar.DAY_OF_WEEK));
}
}
[/code]
Hi, can anyone explain why this output is 6 instead of 3? Based on this list it should be 3.
Days of week are represented as:
SUNDAY = 1
MONDAY = 2
TUESDAY = 3
WEDNESDAY = 4
THURSDAY = 5
FRIDAY = 6
SATURDAY = 7
Thank you