InterviewVault
Welcome back, Sujit Kumar Mishra
Admin
SK Mishra
Revision Mode
Document technical questions and best-practice answers.
Explain the difference between JDK, JRE and JVM?
1: JVM (Java Virtual Machine)
It is like a translator that runs Java programs. It takes the compiled Java code (bytecode) and converts it into machine code so your computer can understand and execute it.
2: JRE (Java Runtime Environment)
It is a package that gives you everything you need to run Java programs, including the JVM and some libraries, but it does not have tools for developing Java programs.
3: JDK (Java Development Kit)
It is a complete package for Java developers. It includes the JRE (so you can run programs), the JVM, and also tools to write, compile, and debug Java code.
In short:
JVM = Runs Java programs
JRE = Runs Java programs + libraries
JDK = Develops and runs Java programs (JRE + development tools)