Java.util.Date.getHashcode() 方法


Java.util.Date.getHashcode() 方法

package com.codingdict;

import java.util.*;

public class DateDemo {
   public static void main(String[] args) {

      // create a date
      Date date = new Date(99, 5, 10);

      // display current date
      System.out.println("The current date shows: " + date.toString());

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