VOOZH about

URL: https://www.geeksforgeeks.org/java/abstractlist-hashcode-method-in-java-with-examples/

⇱ AbstractList hashCode() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AbstractList hashCode() method in Java with Examples

Last Updated : 11 Jul, 2025
The hashCode() method of java.util.AbstractList class is used to return the hash code value for this list. Syntax:
public int hashCode()
Returns Value: This method returns the hash code value for this list. Below are the examples to illustrate the hashCode() method. Example 1:
Output:
ArrayListlist : [10, 20, 30, 40, 50]
HashCode : 38490301
Example 2:
Output:
ArrayListlist : [A, B, C, D, E]
HashCode : 90690786
Comment