Skip to content

Commit 34ff1e6

Browse files
Update HashSetDemo24.java
1 parent 25da34a commit 34ff1e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

HashSetDemo24.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ public static void main(String[] args) {
1111
set.add("b");
1212

1313
set.hashCode();
14+
//this is from : java.util.AbstractSet.hashCode()
1415

1516
System.out.println(set.hashCode());
1617

1718
set.forEach(i -> System.out.println(i.hashCode()) );
19+
//Note : i.hashCode() is of Wrapper Class String's Hash Code and not of Abstract Set.
20+
//i.e. : java.lang.String.hashCode()
1821
}
1922

2023

0 commit comments

Comments
 (0)