Calendar getInstance() Method in Java with Examples Last Updated : 18 Feb, 2019 Comments Improve Suggest changes Like Article Like Report The getInstance() method in Calendar class is used to get a calendar using the current time zone and locale of the system. Syntax: public static Calendar getInstance() Parameters: The method does not take any parameters. Return Value: The method returns the calendar. Below program illustrates the working of getInstance() Method of Calendar class: Example: Java // Java code to illustrate // getGreatestMinimum() method import java.util.*; public class Java_Calendar_Demo { public static void main(String args[]) { // Creating a calendar Calendar calndr = Calendar.getInstance(); // Display the date and time System.out.print("The system" + " date and time is: " + calndr.getTime()); } } Reference: https://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html#getInstance() Comment More infoAdvertise with us Next Article Calendar getInstance() Method in Java with Examples chinmoy lenka Follow Improve Article Tags : Misc Java Java-Functions Java-Calendar Practice Tags : JavaMisc Similar Reads Calendar get() method in Java with Examples The get(int field_value) method of Calendar class is used to return the value of the given calendar field in the parameter. Syntax: public int get(int field) Parameters: The method takes one parameter field_value of integer type and refers to the calendar whose value is needed to be returned. Return 2 min read Calendar getDisplayName() Method in Java with Examples The getDisplayName(int cal_field, int cal_style, Locale local) method of Calendar class is used to return the string representation of a calendar field(int cal_field) value in the given style(int cal_style) and locale(int local). Syntax: public String getDisplayName(int cal_field, int cal_style, Loc 3 min read Calendar getDisplayNames() Method in Java with Examples The getDisplayNames(int cal_field, int cal_style, Locale local) method of Calendar class is used to return a map containing all the names of the calendar field(int cal_field) in the given style(int cal_style) and locale(Locale local) and their corresponding field values. Syntax: public Map getDispla 2 min read Calendar getTimeZone() Method in Java with Examples The getTimeZone() method in Calendar class is used to return the current time-zone of this Calendar. Syntax: public TimeZone getTimeZone() Parameters: The method does not take any parameters.Return Value: The method returns timezone of this Calendar object. Below programs illustrate the working of g 2 min read Calendar getMinimum() Method in Java with Examples The getMinimum(int calndr_field) method in Calendar class is used to return the Minimum value for the given calendar field(int calndr_field) of this Calendar instance. Syntax: public abstract int getMinimum(int calndr_field) Parameters: The method takes one parameter calndr_field that refers to the 2 min read Calendar getMaximum() method in Java with Examples The getMaximum(int calndr_field) method in Calendar class is used to return the maximum value for the given calendar field(int calndr_field) of this Calendar instance. Syntax: public abstract int getMaximum(int calndr_field) Parameters: The method takes one parameter calndr_field that refers to the 2 min read Calendar hashCode() Method in Java with Examples The hashCode() method in Calendar class is used to return the hash code for this Calendar Object.Syntax: public int hashCode() Parameters: The method does not take any parameters.Return Value: The method returns the hash code value for this calendar object..Below programs illustrate the working of h 2 min read Calendar getLeastMaximum() method in Java with Examples The getLeastMaximum(int calndr_field) method in Calendar class is used to return the lowest maximum value for the given calendar field(int calndr_field) of this Calendar instance. Syntax: public abstract int getLeastMaximum(int calndr_field) Parameters: The method takes one parameter calndr_field th 2 min read Calendar isLenient() Method in Java with Examples The isLenient() method in Calendar class is used to know and understand whether the date and time interpretation of this Calendar is to be considered lenient or not.Syntax: public boolean isLenient() Parameters: The method does not take any parameters.Return Value: The method either returns True if 2 min read Calendar isSet() Method in Java with Examples The isSet(int calndr_field) method in Calendar class is used to check whether the given calendar field has a value set or not. All the Cases for which the values have been set by the calculations of the internal field are triggered by a get method call. Syntax: public final boolean isSet(int calndr_ 2 min read Like