Skip to main content
added 210 characters in body
Source Link
Stephen C
  • 723.1k
  • 95
  • 849
  • 1.3k

What's the relation between a HashSet and a HashMap?

The relationship is that each HashSet<T> has a private HashMap<T, Object> inside it. (In the Java 7 version, values are a private Object instance ...)

And what do they mean with "load factor"?

The term "load factor" is defined in the javadoc for HashMap. You can read about it there. (That's what it was written for ...)

Reference:

The relationship is that each HashSet<T> has a private HashMap<T, Object> inside it. (In the Java 7 version, values are a private Object instance ...)

Reference:

What's the relation between a HashSet and a HashMap?

The relationship is that each HashSet<T> has a private HashMap<T, Object> inside it. (In the Java 7 version, values are a private Object instance ...)

And what do they mean with "load factor"?

The term "load factor" is defined in the javadoc for HashMap. You can read about it there. (That's what it was written for ...)

Reference:

Source Link
Stephen C
  • 723.1k
  • 95
  • 849
  • 1.3k

The relationship is that each HashSet<T> has a private HashMap<T, Object> inside it. (In the Java 7 version, values are a private Object instance ...)

Reference: