Skip to main content
InterviewHubPRO
Section Overview
Q42

Question 42 of 50

Part 3: JVM Internals, Low-Latency Systems & Production Tuning (25 - 35)

84%
Java Core & JVM (50 Qs)•Part 3: JVM Internals, Low-Latency Systems & Production Tuning (25 - 35)

Java Dynamic Proxies vs Bytecode Manipulation (ByteBuddy / CGLIB).

senior LeveljavaJVM Internals

In Simple Words: Dynamic proxies create proxy classes at runtime:

  • JDK Dynamic Proxy (Proxy.newProxyInstance): Built into the JDK. Requires target classes to implement an interface. Intercepts calls via InvocationHandler.
  • CGLIB / ByteBuddy: Subclasses concrete classes directly at runtime by generating raw JVM bytecode. Used by Spring Boot for @Transactional and AOP aspect interception on non-interface service classes.