StringCharacterIterator hashCode Example
StringCharacterIterator class hashCode example. This example shows you how to use hashCode method.
StringCharacterIterator class hashCode example. public int hashCode() Computes a hashcode for this iterator.
Here is the code
/*
* @ # HashCode.java
* A class representing use to hashCode method of
* StringCharacterIterator class in java.text package
* version 13 June 2008
* author Rose India
*/
import java.text.*;
public class HashCode {
public static void main(String args[]) {
StringCharacterIterator s, s1;
s = new StringCharacterIterator("Roseindia");
s1 = new StringCharacterIterator("Roseindia");
//hash code of the objects
System.out.println(s.hashCode());
System.out.println(s1.hashCode());
}
} |
|