getActualMaximum(int): This method is available in java.util.Calendar class of Java.
Syntax:
int java.util.Calendar.getActualMaximum(int field)
This method takes one argument of type int as its parameter. This method returns the maximum value that the specified calendar field could have, given the time value of this Calendar.
Parameters: One parameter is required for this method.
field: the calendar field.
Returns: the maximum of the given calendar field for the time value of this Calendar.
Exceptions: NA
Approach
Java
import java.util.Calendar;public class CalendargetActualMaximum {public static void main(String[] args) {// create a calendarCalendar calendar = Calendar.getInstance();int field = 1;System.out.println(calendar.getActualMaximum(field));}}
Output:
292278994
No comments:
Post a Comment