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());
    }
}

Output
-28360415
-28360415

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US