What is the difference between JDK, JRE, and JVM?
JVM is the runtime engine that executes Java bytecode. JRE provides the JVM plus the libraries needed to run Java programs. JDK contains the JRE along with development tools such as `javac`, `javadoc`, and debugger tools.
A simple interview way to say it is: JVM runs the code, JRE runs Java applications, and JDK is used to develop Java applications. If you can compile code, you need JDK. If you only want to run compiled Java code, JRE is enough in theory.