Return to site

JAVA CERTIFICATION QUESTION: Manipulating Java lists—and views of lists

=>Is a list unmodifiable? Is it immutable? What about the views of the list?

· java,ocp

Given the following code fragment

Which statements are correct? Choose three.

  • A. The output contains la=[A1, A2]
  • B. The output contains lf=[A1, A2]
  • C. The output contains lc=[L1, L3]
  • D. The output contains lu=[L1, L3]
  • E. If you add the following at line n1, the output will contain lf=[A1, A3]: lf.set(1, "A3");
  • F. If you add the following at line n1, the output will contain la=[A1, A3]: la.set(1, "A3");

 

 

#java #certificationquestion #ocp

·ꓞ puɐ ʻꓷ ʻꓭ suoᴉʇdo ǝɹɐ sɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ