Example usage for java.util Calendar hashCode

List of usage examples for java.util Calendar hashCode

Introduction

In this page you can find the example usage for java.util Calendar hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns a hash code for this calendar.

Usage

From source file:Main.java

public static void main(String[] args) {

    Calendar cal = Calendar.getInstance();

    // get the hash code and print it
    int i = cal.hashCode();
    System.out.println("A hash code for this calendar is: " + i);
}

From source file:com.feilong.core.date.DateUtilTest.java

/**
 * Test1.//from  w  w w.  j a  v  a 2 s.  c  o  m
 */
@Test
public void test1() {
    Calendar calendar = DateUtil.toCalendar(TESTDATE_20141231013024);
    LOGGER.debug(calendar.getActualMaximum(Calendar.SECOND) + "");
    LOGGER.debug(calendar.getTimeInMillis() + "");
    LOGGER.debug(calendar.hashCode() + "");
    LOGGER.debug(DateUtil.getDayOfMonth(NOW) + "");
}