Java Date.hashCode()
Syntax
Date.hashCode() has the following syntax.
public int hashCode()
Example
In the following code shows how to use Date.hashCode() method.
//from w w w . j av a2 s . co m
import java.util.*;
public class Main {
public static void main(String[] args) {
Date date = new Date();
int i = date.hashCode();
System.out.println( i);
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »