StringCharacterIterator hashCode() method in Java with Examples Last Updated : 29 Jul, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The hashCode() method of java.text.StringCharacterIterator class in Java is used to get the hashCode value of this StringCharacterIterator. This method returns an integer representing the hashCode value. Syntax: public int hashCode() Parameter: This method do not accept any parameter. Return Value: This method returns an int which is the hashCode value of this StringCharacterIterator. Exception: This method do not throw any Exception. Program: Java // Java program to demonstrate // the above method import java.text.*; import java.util.*; public class StringCharacterIteratorDemo { public static void main(String[] args) { String text = "GeeksForGeeks"; StringCharacterIterator stringCharacterIterator = new StringCharacterIterator(text); System.out.println("Current Text: " + text); System.out.println("HashCode value: " + stringCharacterIterator .hashCode()); } } Output: Current Text: GeeksForGeeks HashCode value: -1054991464 Reference: https://docs.oracle.com/javase/9/docs/api/java/text/StringCharacterIterator.html#hashCode-- Comment More infoAdvertise with us Next Article Java String hashCode() Method with Examples S ShubhamMaurya3 Follow Improve Article Tags : Java Java-Functions Java-text package Java-StringCharacterIterator Practice Tags : Java Similar Reads StringWriter hashCode() method in Java with Examples The hashCode() method of StringWriter Class in Java is used to get the HashCode value of this StringWriter instance. This method does not accepts any parameter and returns the required int value. Syntax: public int hashCode() Parameters: This method accepts does not accepts any parameter. Return Val 2 min read SortedSet hashCode() method in Java with Examples The hashCode() method of SortedSet in Java is used to get the hashCode value for this instance of the SortedSet. It returns an integer value which is the hashCode value for this instance of the SortedSet. Syntax: public int hashCode() Parameters: This function has no parameters. Returns: The method 2 min read Short hashCode() method in Java with Examples The hashCode() method of Short class is a built in method in Java which is used to return the hash code of the ShortObject. Note: The hashCode() returns the same value as intValue(). Syntax ShortObject.hashCode() Return Value: It return an int value which represents the hashcode of the specified Sho 2 min read Java String hashCode() Method with Examples The Java String hashCode() method is used to return the particular value's hash value. The hashCode() uses an internal hash function that returns the hash value of the stored value in the String variable. Hash Value: This is the encrypted value that is generated with the help of some hash function. 2 min read TreeSet hashCode() method in Java with Example The hashCode() method of TreeSet in Java is used to get the hashCode value for this instance of the TreeSet. It returns an integer value which is the hashCode value for this instance of the TreeSet. Syntax: public int hashCode() Parameters: This function has no parameters. Returns: The method return 2 min read OptionalInt hashCode() method in Java with examples The hashCode() method help us to get the hash code of the value, if Int value is present, otherwise 0 (zero) if no Int value is present in OptionalInt object. Syntax: public int hashCode() Parameters: This method accepts does not accepts any parameter. Return value: This method returns hash code val 1 min read Like