Oracle Java SE 21 Developer Professional 1z0-830 Question # 12 Topic 2 Discussion

Oracle Java SE 21 Developer Professional 1z0-830 Question # 12 Topic 2 Discussion

1z0-830 Exam Topic 2 Question 12 Discussion:
Question #: 12
Topic #: 2

How would you create a ConcurrentHashMap configured to allow a maximum of 10 concurrent writer threads and an initial capacity of 42?

Which of the following options meets this requirement?


A.

var concurrentHashMap = new ConcurrentHashMap(42);


B.

None of the suggestions.


C.

var concurrentHashMap = new ConcurrentHashMap();


D.

var concurrentHashMap = new ConcurrentHashMap(42, 10);


E.

var concurrentHashMap = new ConcurrentHashMap(42, 0.88f, 10);


Get Premium 1z0-830 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.