import java.util.*; GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date(2021, 1, 15, 12, 30, 0));
import java.util.*; GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date());
import java.util.*; GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(1610463600000L);This code sets the time of the GregorianCalendar object to January 12th, 2021 at 6:00 PM based on the milliseconds value provided. Overall, the GregorianCalendar class and its methods are part of the java.util package library.