Calendar class getGreatestMinimum(int field) method example
Calendar class getGreatestMinimum(int field) method example. This example shows you how to use getGreatestMinimum(int field) method.This method Returns the highest minimum value for the given calendar field of this Calendar instance.
Here is the code:-
/**
* @Program that Returns the highest minimum value for the given calendar field
* of this Calendar instance.
* getGreatestMinimumcalender.java
* Author:-RoseIndia Team
* Date:-22-May-2008
*/
import java.util.*;
public class getGreatestMinimumcalender {
public static void main(String[] args) {
//Creating calender
Calendar cal = new GregorianCalendar(2007,10,23);
// Display the greatest min. for field #1:
System.out.println("The minimum is: " +
cal.getGreatestMinimum(3));
}
} |
|