Oracle Database 11g: Program with PL/SQL — Question 72
Which two statements are correct about PL/SQL package components? (Choose two)
Answer options
- A. A package must have both specification and body.
- B. A package body can exist without the package specification.
- C. A package specification can exist without the package body.
- D. When a packaged public variable is called for the first time in a session, the entire package is loaded into memory.
Correct answer: C, D
Explanation
Option C is correct because a package specification can indeed stand alone without the body. Option D is also correct as the entire package is loaded into memory when a public variable is accessed for the first time. Options A and B are incorrect because a package must have a specification to be valid, and the package body cannot exist without the specification.