Java DateFormatSymbols hashCode() Example
DateFormatSymbols class hashCode() method example. This example shows you how to use hashCode() method.
Syntax is : public int hashCode()
Method returns a hash code for the DateFormatSymbols object.
Here is the code.
/**
* @(#) HashCodeDateFormatSymbols.java
* A class representing use of method hashCode() of DateFormatSymbols
class in java.text Package.
* @Version 14-May-2008
* @author Rose India Team
*/
import java.text.*;
class HashCodeDateFormatSymbols {
public static void main(String[] args) {
// Create new DateFormatSymbols object.
DateFormatSymbols dFormatSymbols = DateFormatSymbols.getInstance();
// hashCode() method call.
int hashCode = dFormatSymbols.hashCode();
System.out.print("Hash code of DateFormatSymbols object : " + hashCode);
}
} |
Output of the program.
| Hash code of DateFormatSymbols object : -2080278613 |
|