GregorianCalendar class getActualMinimum(int field) method example

Returns the minimum value that this calendar field could have


GregorianCalendarclass getActualMinimum(int field) method example. This example shows you how to use getActualMinimum(int field) method.This method Returns the minimum value that this calendar field could have

Here is the code:-
/**
 * @Program that Returns the minimum value that this calendar field could have
 * GetActualMinimum.java 
 * Author:-RoseIndia Team
 * Date:-27-May-2008
 */
import java.util.*;
public class GetActualMinimum {
public static void main(String[] args) {
//Creating a Calendar    
GregorianCalendar g=new GregorianCalendar(2004,6,23);
//Returns the minimum value that this calendar field could have
int i=g.getActualMinimum(Calendar.YEAR);
System.out.println("The minimum value that this calendar field could have is: "
        +i);
    }

}

Output of the program:-
The minimum value that this calendar field could have is: 1

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US