Calendar internalGet() Method in Java with Examples
The internalGet(int calndr_field) method in Calendar class is used to return the value of the given calendar field as a parameter.
Note: The operation does not involve any normalization or validation.
protected final int internalGet(int calndr_field)
Parameters: The method takes one parameter calndr_field that refers to the calendar field which is to be operated upon.
Return Value: The method returns the value of the passed parameter.
Below programs illustrate the working of internalGet() Method of Calendar class:
The current date is: Wed Feb 20 16:11:36 UTC 2019 Month is: 1 Year is: 2019
Calendar: Thu Feb 21 09:43:53 UTC 2019 Year: 2019 Month: 1 Day: 5
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.