Compile Time
- Who: Java Compiler (
javac) - Input: Source code (
.java) - Output: Bytecode (
.class) - Errors: Syntax errors (missing semicolon, wrong type)
Runtime
- Who: Java Virtual Machine (JVM)
- Input: Bytecode (
.class) - Output: Program execution
- Errors: Runtime exceptions (DivByZero, NullPointer)
Process
Main.javajavac Main.java -> Main.classjava Main