Virtual Machine

Let us clear up the difference between JVM and DVM first.

Java Virtual Machine is a virtual machine capable of executing Java bytecode regardless of the base platform. It is based on the principle “Write once, run anywhere.” The Java bytecode can run on any machine capable of supporting JVM.

The Java compiler converts .java files into .class files (bytecode). The bytecode is passed to JVM, which compiles it into machine code for execution directly on the CPU.

JVM features:

  • Stack architecture. The stack is used as a data structure where methods are placed and stored. It works by the LIFO scheme or “Last in — First Out.”
  • Runs .class files only.
  • Uses a JIT compiler.

#virtual-machine #mobile-app-development #software-development #android

Android: Dalvik vs ART
1.25 GEEK