ParsePosition hashCode Example
ParsePosition class hashCoad example. This example shows you how to use hashCode method.
ParsePosition class hashCoad example. This example shows you how to use hashCode method.
Here is the code
/*
* @ # HashCode.java
* A class repersenting use to hashCode method of
* ParsePosition class in java.text package
* version 13 June 2008
* author Rose India
*/
import java.text.*;
public class HashCode {
public static void main(String args[]) {
// create instance of parse position
ParsePosition p = new ParsePosition(10);
// Retrieve the current parse position.
System.out.println("Hash code for ParsePosition. " +
"" + p.hashCode());
System.out.println("Hash code for ParsePosition. " +
"" + new ParsePosition(10).hashCode());
}
} |
Output
Hash code for ParsePosition. -65526
Hash code for ParsePosition. -65526 |
|