Skip to main content

Explain the Proxy design pattern.

Mid Java
Quick Answer Proxy pattern provides a surrogate that controls access to another object. Types: Virtual proxy (lazy initialization - create expensive object only when needed), Protection proxy (access control), Remote proxy (represents object in another JVM/network - Java RMI), Logging/caching proxy. Spring AOP uses dynamic proxies to add cross-cutting concerns (transactions, security, logging) without modifying your code.

Answer

Provides a surrogate object to control access to another object.
Used for lazy loading, security, caching, and remote proxies.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice