What is the difference between JDK, JRE, and JVM?
Why Interviewers Ask This
This is a classic screening question for Java roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
These three acronyms represent different levels of the Java ecosystem. The JVM (Java Virtual Machine) is the runtime engine that executes Java bytecode — it handles memory management, garbage collection, and translates bytecode to machine code for the host OS. The JRE (Java Runtime Environment) is the JVM plus the standard class libraries needed to run Java programs — end users need the JRE to run Java applications. The JDK (Java Development Kit) is the complete development package: JRE plus the compiler (javac), debugger, and other tools needed to write and compile Java programs. Developers need the JDK; end users only need the JRE.
Common Mistake
Many candidates answer correctly but can't explain the 'why'. Always be prepared to justify your answer with a concrete example or use case from your Java experience.