Oracle Database: Program with PL/SQL — Question 69

Which two blocks of code execute successfully?

Answer options

Correct answer: B, D

Explanation

Options B and D are correct because they properly initialize the collection before accessing its elements. Option A fails because it attempts to assign a value to an uninitialized element, while C encounters an issue trying to extend the collection without having initialized it first. Option E has a syntax error due to a missing semicolon after the type declaration.