nerdexam
Oracle

1Z0-805 · Question #69

1Z0-805 Question #69: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-805 to reveal the answer and full explanation for question #69. The question stem and answer options stay visible for context.

Question

Given the following code fragment: public static void getInfo() { //insert code here List fontCatalog = new ArrayList(); fontCatalog.add("Algerian"); fontCatalog.add("Cambria"); fontCatalog.add("Lucida Bright"); category.put("firstCategory",fontCatalog); List entrySet = new ArrayList(category.entrySet()); Iterator it = entrySet.iterator(); while(it.hasNext()) { System.out.println(it.next)); } } Which two code fragments, when inserted independently at line **, enable the code to compile?

Options

  • AMap<String, List<String>> category = new HashMap<List> ();
  • BMap<String, List<String>> category = new HashMap<<>,List<>>();
  • CMap<String, List<String>> category = new HashMap<> ();
  • DMap<String, List<String>> category = new HashMap <String, ArrayList<String>> ();
  • EMap<String, List<String>> category = new HashMap<String, List<String>> ();
  • FMap<String, List<String>> category = new HashMap<String, List <>> ();

Unlock 1Z0-805 to see the answer

You've previewed enough free 1Z0-805 questions. Unlock 1Z0-805 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.

Full 1Z0-805 Practice