Javatpoint Logo
Javatpoint Logo

Java Calendar internalGet() Method

The internalGet() method of java.util.Calendar class is a final, and protected method. This method returns the value of the calendar field passed as a parameter.

Syntax

Parameter

field - the given calendar field.

Returns

the value for the given calendar field.

Throws

Does not throw Exception.

Example 1

Test it Now

Output:

The current date is : Fri Aug 10 17:08:13 PDT 2018
Year  : 2018
Month  : 7
Day : 6
 Year   2018 Month  6 Day  6

Example 2

Test it Now

Output:

Todays date is : Fri Aug 10 17:13:07 PDT 2018
 HOUR  : 5
 MINUTE : 13
SECOND : 7




Please Share

facebook twitter google plus pinterest