Multiple choice technology programming languages

As part of your new application you need to create a custom class loader so that you can implement with custom security. So you need to create objects without knowing the class of the objects or how to create them. What pattern should you use for this?

  1. Abstract factory

  2. Builder

  3. Prototype

  4. Singleton

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Prototype pattern allows creating new objects by copying an existing instance (prototype) without knowing their concrete class or how to construct them. This matches the requirements of a custom class loader loading classes dynamically. Builder, Abstract Factory, and Singleton require explicit creation logic or type knowledge.