Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference between "new HashSet<>(1)" with "new HashSet<>()"? #17

Open
JarenFeng opened this issue Mar 10, 2017 · 0 comments
Open

Difference between "new HashSet<>(1)" with "new HashSet<>()"? #17

JarenFeng opened this issue Mar 10, 2017 · 0 comments

Comments

@JarenFeng
Copy link

I noticed that you used the new HashSet<>(1) instead of new HashSet<>() to initialize a HashSet,is there any profits by doing that?

I read the source code and find that new HashSet<>(1) or new HashSet<>() neither really initialize a HashMapEntry array,it's initialized when method V put(K,V) was first called by void inflateTable(int size).

AM I WRONG OR MISSED?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant