Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Main {

    public static void main(String[] args) {

        Calendar cal = Calendar.getInstance();

        // specify a date for one of them
        Calendar cal2 = new GregorianCalendar(2013, 06, 29);

        // compare the two calendars.
        boolean b = cal.equals(cal2);

        // print result
        System.out.println("Calendars are equal :" + b);
    }
}