Java Virtual Machine (JVM) is a runtime environment that executes Java bytecode, making Java applications platform-independent.

Key Functions:

  • Bytecode execution → Converts Java bytecode into machine code for the host system.
  • Memory management → Handles allocation and garbage collection.
  • Security → Provides a sandboxed environment for running code safely.
  • Portability → Enables Java’s “Write Once, Run Anywhere” principle.

It also supports other languages compiled to bytecode, like Kotlin, Scala, and Groovy.