GregorianCalendar: getTime() : GregorianCalendar « java.util « Java by API






GregorianCalendar: getTime()

  
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
  public static void main(String[] a) {
    GregorianCalendar calendar = new GregorianCalendar();
    Date now = calendar.getTime();
    System.out.println(now);
  }
}

   
    
  








Related examples in the same category

1.new GregorianCalendar()
2.new GregorianCalendar(int year, int month, int dayOfMonth)
3.new GregorianCalendar(Locale aLocale)
4.new GregorianCalendar(TimeZone zone, Locale aLocale)
5.GregorianCalendar: get(int a)
6.GregorianCalendar: isLeapYear()
7.GregorianCalendar: roll(int field, boolean up)
8.GregorianCalendar: set(int field, int value)
9.GregorianCalendar: set(int year, int month, int date)
10.GregorianCalendar: setTime(Date date)