Advanced
Java
Q92 / 100
What is the purpose of the java.lang.instrument package?
Correct! Well done.
Incorrect.
The correct answer is B) To allow Java agents to transform class bytecode at load time via a ClassFileTransformer
B
Correct Answer
To allow Java agents to transform class bytecode at load time via a ClassFileTransformer
Explanation
Java agents use Instrumentation.addTransformer() to hook into class loading and modify bytecode before the class is defined, powering APM tools, coverage agents, and mocking frameworks.
Progress
92/100