Course Content
Core Java
About Lesson

Compilation

Compiling is a process of translating high-level source code into machine code (binary instructions) that can be directly executed by the CPU. eg C

The source code written by the programmer is translated into machine-readable instructions by the compiler.

Compiled code can be executed directly by the CPU without the need for an interpreter or runtime environment.

Advantage: Compiled languages typically produce native machine code optimized for the target platform, resulting in faster execution speeds compared to interpreted languages.

Disadvantage: Compiled code is specific to the target platform and may not be portable to other platforms without recompilation.

Interpret

Executing code where the interpreter reads each bytecode (in case of Java) or AST instruction one by one and executes it immediately.

Advantage: Since the interpreter translates bytecode into machine code at runtime, interpreted languages can be executed on any platform with a compatible interpreter.

Disadvantage: Interpreting bytecode line by line incurs overhead, leading to slower execution speeds compared to compiled languages.

Scroll to Top