Phase 1: Edit
We create the program on editor, after that it stored in the disk with the name’s ending .java
Phase 2: Compile javac (java compiler)
Compiler translate from high-level language program to byte codes and store it in disk with the ending name .class.
Phase 3: Load
Class loader compile read and put those byte codes from disk to Primary Memory.
Phase 4: Verify
Verify byte codes to confirm that all byte codes are valid and do not risk for the Java’s security restrictions.
Phase 5: Execute
Java Virtual Machine (JVM) read and translates those byte codes to language that computer can understand (Machine Language). Then execute the program, store it values in primary memory.