Oracle
1Z0-804 · Question #86
1Z0-804 Question #86: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-804 to reveal the answer and full explanation for question #86. The question stem and answer options stay visible for context.
Question
Given: ConcurrentMap <String, String> PartList = new ConcurrentMap<>(); Which fragment puts a key/value pair in partList without the responsibility of overwriting an existing key?
Options
- ApartList.out(key,"Blue Shirt");
- BpartList.putIfAbsent(key,"Blue Shirt");
- CpartList.putIfNotLocked (key,"Blue Shirt");
- DpartList.putAtomic(key,"Blue Shirt")
- Eif (!partList.containsKey(key)) partList.put (key,"Blue Shirt");
Unlock 1Z0-804 to see the answer
You've previewed enough free 1Z0-804 questions. Unlock 1Z0-804 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.