1Z0-819 · Question #36
What makes Java dynamic?
The correct answer is A. At runtime, classes are loaded as needed, and new code modules can be loaded on demand. Java is dynamic because the JVM loads class files at runtime, only when they're actually needed - not all at once when the program starts. This allows programs to load new code modules on demand (via ClassLoader), enabling plugins, frameworks, and reflection-based features to…
Question
Options
- AAt runtime, classes are loaded as needed, and new code modules can be loaded on demand.
- BThe Java compiler uses reflection to convert source code directly into machine-language compilers.
- CThe Java compiler uses reflection to test if class methods are supported by resources of a target platform.
- DThe Java compiler preprocesses classes to run on specific target platforms.
How the community answered
(32 responses)- A81% (26)
- B9% (3)
- C6% (2)
- D3% (1)
Explanation
Java is dynamic because the JVM loads class files at runtime, only when they're actually needed - not all at once when the program starts. This allows programs to load new code modules on demand (via ClassLoader), enabling plugins, frameworks, and reflection-based features to work without recompilation.
Why the distractors are wrong:
- B is wrong on two counts: reflection is a runtime feature (not a compiler feature), and the compiler produces bytecode, not machine-language compilers.
- C confuses the compiler with the runtime; reflection checks method availability at runtime, not during compilation, and it's the JVM - not the compiler - that handles target-platform compatibility.
- D describes the opposite of Java's design philosophy; Java compiles to platform-independent bytecode, and the JVM handles platform specifics at runtime (Write Once, Run Anywhere).
Memory tip: Think of "dynamic" as "delayed" - Java delays class loading until the last possible moment at runtime, rather than locking everything in at compile time. If the answer mentions the compiler doing something dynamic, it's a trap.
Topics
Community Discussion
No community discussion yet for this question.